/*

 Sizzle CSS Selector Engine
 Copyright 2011, The Dojo Foundation
 Released under the MIT, BSD, and GPL Licenses.
 More information: http://sizzlejs.com/

 jQuery JavaScript Library v1.7.2
 http://jquery.com/

 Copyright 2011, John Resig
 Dual licensed under the MIT or GPL Version 2 licenses.
 http://jquery.org/license

 Includes Sizzle.js
 http://sizzlejs.com/
 Copyright 2011, The Dojo Foundation
 Released under the MIT, BSD, and GPL Licenses.

 Date: Wed Mar 21 12:46:34 2012 -0700

 jQuery UI 1.8.14

 Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 Dual licensed under the MIT or GPL Version 2 licenses.
 http://jquery.org/license

 http://docs.jquery.com/UI

 jQuery UI Widget 1.8.14

 Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 Dual licensed under the MIT or GPL Version 2 licenses.
 http://jquery.org/license

 http://docs.jquery.com/UI/Widget

 jQuery UI Mouse 1.8.14

 Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 Dual licensed under the MIT or GPL Version 2 licenses.
 http://jquery.org/license

 http://docs.jquery.com/UI/Mouse

 Depends:
 jquery.ui.widget.js
: Licensed under The MIT License. See license.txt and http://www.datejs.com/license/. 
 @website: http://www.datejs.com/

 This application uses other third-party javascript components
 distributed under appropriate licenses. For more information,
 see the following files at http://trello.com/js/lib/
 backbone.js
 highcharts.js
 json2.js
 markdown.js
 socket.io.js
 underscore.js
 Socket.IO.js build:0.8.6, development. Copyright(c) 2011 LearnBoost <dev@learnboost.com> MIT Licensed 
 ! CHANGES FOR TRELLO: Remove all transports other than built-in browser Websockets, try/catch around errors, fix transport merge, fix heartbeat
 ! Diff with published v0.8.6 for the details.
*/
(function(y){
    function C(d,c){
        return!c&&!y.load||y.load&&-1!=y.load.indexOf(d)
        }
        if(!y.preloading){
        y.Api={
            methodMap:{
                App:["login","search"],
                BoardSubDoc:["create","update"],
                Organization:"create,delete,update,removeMember,addAdmin,removeAdmin,addBoard,removeBoard".split(","),
                OrganizationSubDoc:["create","update"],
                Board:"create,update,get,actions,setOrganization,removeMember,addAdmin,removeAdmin,clone,getShortLink".split(","),
                OrganizationInvitation:["create","update","delete"],
                Card:"create,update,get,delete,actions,getVoterDisplayData,addComment,deleteAction,setDueDate,setChecklistTaskState,attachFile,deleteAttachment,moveToBoard,getShortLink".split(","),
                List:["create","update","get"],
                Checklist:["create","update","addTask"],
                BoardPreference:["create","update"],
                CheckItem:["create","update","delete","changeName","convertToCard"],
                SubDoc:["create","update"],
                Member:"create,update,get,actions,updatePassword,markNotificationRead,notifications,checkValidators,addToBoard,respondToInvitation,deleteAccount,uploadAvatar,useGravatar,useUploadedAvatar,clearAvatar".split(","),
                Doc:["create","update"],
                Api:[],
                BoardInvitation:["create","update","delete"]
                }
            };
        
    var t={
        popover_auto_mentioner:'{{#button}} <input type="text" class="js-filter-mentionables js-autofocus" placeholder="Search members..."> {{/button}} <ul class="pop-over-member-list js-available-members"></ul> {{#button}} <div class="js-select-multiple-options" style="display: none;"> <hr> <ul class="pop-over-list"> <li> <a href="#" class="js-select-all-card-members" style="display: none;"> Mention All Card Members <span class="quiet mem-count"></span> </a> </li> <li> <a href="#" class="js-select-all-board-members" style="display: none;"> Mention All Board Members <span class="quiet mem-count"></span> </a> </li> <li> <a href="#" class="js-select-all-commenters" style="display: none;"> Mention All Commenters <span class="quiet mem-count"></span> </a> </li> </ul> </div> {{/button}} ',
        checkitem_inline:' checklist item "{{name}}" ',
        popover_member_searcher:'{{#showSearch}} <input type="text" class="js-filter-members js-autofocus" placeholder="Search members..."> {{/showSearch}} <ul class="pop-over-member-list checkable js-members-list"></ul> ',
        header_boards_menu:'<input type="text" class="js-search-boards js-autofocus js-no-touch-autofocus" placeholder="Search your boards..."> <ul class="navigable pop-over-list js-fill-boards" /> <hr> <ul class="pop-over-list"> <li> <a class="js-see-all-boards" href="{{allBoardsUrl}}"> See All Boards </a> </li> <li> <a class="js-add-board" href="#"> New Board </a> </li> <li> <a class="js-view-archive" href="#"> View Closed Boards </a> </li> </ul> ',
        entity:'{{#textType}} {{#isContext}} {{^hideIfContext}} {{text}} {{/hideIfContext}} {{/isContext}} {{^isContext}} {{text}} {{/isContext}} {{/textType}} {{#cardType}} {{#isContext}} {{^hideIfContext}} this card {{/hideIfContext}} {{/isContext}} {{^isContext}} <a href="{{url}}" class="inline-object action-card">{{name}}</a> {{/isContext}} {{/cardType}} {{#boardType}} {{#isContext}} this board {{/isContext}} {{^isContext}} <a href="{{url}}" class="inline-object">{{name}}</a> {{/isContext}} {{/boardType}} {{#organizationType}} {{#isContext}} this organization {{/isContext}} {{^isContext}} {{#url}} {{#displayName}} <a href="{{url}}" class="inline-object">{{displayName}}</a> {{/displayName}} {{^displayName}} <a href="{{url}}" class="inline-object">{{name}}</a> {{/displayName}} {{/url}} {{^url}} an organization {{/url}} {{/isContext}} {{/organizationType}} {{#listType}} {{name}} {{/listType}} {{#checklistType}} {{name}} {{/checklistType}} {{#checkItemType}} {{name}} {{/checkItemType}} {{#commentType}} <div class="action-comment">{{{html}}}</div> {{/commentType}} {{#labelType}} <span class="card-label {{color}}-label" title="{{#text}}{{text}}{{/text}}{{^text}}{{color}} label (default){{/text}}"> {{#text}}{{text}}{{/text}} {{^text}}&nbsp;{{/text}} </span> {{/labelType}} {{#attachmentType}} {{#link}} <a href="{{url}}" target="_blank">{{name}}</a> {{/link}} {{^link}} <span class="attachment-deleted">{{name}}</span> {{/link}} {{/attachmentType}} {{#attachmentPreviewType}} {{#showAttachmentPreview}} {{#canPreview}} {{#isImage}}<img class="attachment-image-preview" src="{{url}}" />{{/isImage}} {{^isImage}}<iframe class="attachment-non-image-preview" src="{{url}}" ></iframe>{{/isImage}} {{/canPreview}} {{/showAttachmentPreview}} {{/attachmentPreviewType}} {{#memberType}} {{#avatarHash}} <img class="inline-member-av" src="{{__avatarDomain}}/{{avatarHash}}/30.png" alt="{{fullName}} ({{username}})" title="{{fullName}} ({{username}})" /> {{/avatarHash}} <span class="bold">{{fullName}}</span> {{/memberType}} ',
        popover_switch_archive_section:'<ul class="pop-over-list"> <li> <a class="highlight-icon js-archive-cards" href="#"> Cards {{#section_cards}} <span class="app-icon small-icon check-icon"></span> {{/section_cards}} </a> </li> <li> <a class="highlight-icon js-archive-lists" href="#"> Lists {{#section_lists}} <span class="app-icon small-icon check-icon"></span> {{/section_lists}} </a> </li> </ul> ',
        popover_confirm_action_delete:'<p> Deleting a comment is <em>forever</em>. There is no undo. </p> <input type="submit" class="primary js-delete-action" value="Yes, Delete"> <input type="submit" class="js-cancel-delete" value="Cancel"> ',
        member_invitation:'{{#displayName}}<p class="item-name float-link"><a href="{{url}}">{{displayName}} ({{name}})</a></p>{{/displayName}} {{^displayName}}<p class="item-name float-link"><a href="{{url}}">{{name}}</a></p>{{/displayName}} <div class="options"> <a class="button-link js-accept-invitation" href="#"> Accept </a> <a class="button-link js-reject-invitation" href="#"> Reject </a> </div> ',
        popover_change_roles:'<ul class="pop-over-list"> <li><a class="js-make-admin highlight-icon">Admin {{#memberIsAdmin}}<span class="app-icon small-icon check-icon"></span>{{/memberIsAdmin}}</a></li> <li><a class="{{#canMakeMember}}highlight-icon js-make-member {{/canMakeMember}}{{^canMakeMember}} disabled{{/canMakeMember}}">Member {{^memberIsAdmin}}<span class="app-icon small-icon check-icon"></span>{{/memberIsAdmin}}</a></li> </ul> {{^isMoreThanOneAdmin}} {{#memberIsAdmin}} <hr> <p class="helper"> There must be at least one admin. </p> {{/memberIsAdmin}} {{/isMoreThanOneAdmin}} ',
        card_copy_from:'{{#showInput}}<input class="js-input js-autofocus" type="text" placeholder="Search for a card to copy">{{/showInput}} <div class="js-card-results"></div> ',
        manual_shortcuts:'<div class="markeddown"> <div class="shortcut"> <div class="key-modifier"> <a class="key"> @ </a> </div> <h3> Autocomplete Members </h3> <p> When writing a comment, you can type \'@\' plus a member\'s name, username, or intials and get a list of matching members. You can navigate that list with the up and down arrows. Pressing enter or tab with a member selected will mention that user in the comment. The mentioned user will get a notification once submitted. </p> <p> When adding a new card, you can use the same method to assign members to cards before submitting them. </p> </div> <div class="shortcut"> <div class="key-modifier"> <a class="key"> # </a> </div> <h3> Autocomplete Labels </h3> <p> When adding a new card, you can type \'#\' plus the label\'s color or title and get a list of matching labels. You can use the up and down arrows to navigate the resulting list. Pressing enter or tab will add the label to the composed card. The labels will be added to the card when you submit. </p> </div> <div class="shortcut"> <div class="key-modifier"> <a class="key"> ^ </a> </div> <h3> Autocomplete Position </h3> <p> When adding a new card, you can type \'^\' plus a list name or position in a list. You can also type \'top\' or \'bottom\' to add to the top or bottom of the current list. You can use the up and down arrows to navigate the resulting list. Pressing enter or tab will automatically change the position of the composed card. </p> </div> <div class="shortcut"> <div class="key-modifier"> <a class="key"> A </a> </div> <h3> Assign Members </h3> <p> Pressing \'a\' opens a pop-over menu with a list of assigned and unassigned members. Clicking a member\'s avatar will assign or unassign that person. </p> </div> <div class="shortcut"> <div class="key-modifier"> <a class="key"> &larr; </a> <a class="key"> &uarr; </a> <a class="key"> &darr; </a> <a class="key"> &rarr; </a> </div> <h3> Navigate Cards </h3> <p> Pressing the arrow keys will select adjacent cards on a board. </p> </div> <div class="shortcut"> <div class="key-modifier"> <a class="key"> B </a> </div> <h3> Open Header Boards Menu </h3> <p> Pressing \'b\' opens the boards menu in the header. You can search for boards and navigate boards with the up and down arrows. Pressing enter with a board selected will open it. </p> </div> <div class="shortcut"> <div class="key-modifier"> <a class="key"> C </a> </div> <h3> Archive Card </h3> <p> Pressing \'c\' will archive a card. </p> </div> <div class="shortcut"> <div class="key-modifier"> <a class="key"> D </a> </div> <h3> Due Date </h3> <p> Pressing \'d\' will open the due date picker for a card. </p> </div> <div class="shortcut"> <div class="key-modifier"> <a class="key"> ESC </a> </div> <h3> Close Menu / Cancel Editing </h3> <p> Pressing \'esc\' will close an open dialog window or pop-over or cancel edits and comments you are composing. </p> </div> <div class="shortcut"> <div class="key-modifier"> <a class="key"> ENTER </a> </div> <h3> Open Card / Edit Title </h3> <p> Pressing \'enter\' will open the currently selected card. If the card is open, pressing enter will edit the title. </p> </div> <div class="shortcut"> <div class="key-modifier"> <a class="key"> F </a> </div> <h3> Open Card Filter Menu </h3> <p> Use \'f\' to open the card filter menu. The search by title input is automatically focused. </p> </div> <div class="shortcut"> <div class="key-modifier"> <a class="key"> X </a> </div> <h3> Clear All Filters </h3> <p> Use \'x\' to clear all active card filters. </p> </div> <div class="shortcut"> <div class="key-modifier"> <a class="key"> L </a> </div> <h3> Label </h3> <p> Pressing \'l\' opens a pop-over of the available labels. Clicking a label will add or remove it from the card. </p> <p> Pressing one of the following number keys, will apply or remove that label. </p> <table> <thead> <tr> <th>Key</th> <th>Label Color</th> </tr> </thead> <tbody> <tr> <td>1</td> <td>Green</td> </tr> <tr> <td>2</td> <td>Yellow</td> </tr> <tr> <td>3</td> <td>Orange</td> </tr> <tr> <td>4</td> <td>Red</td> </tr> <tr> <td>5</td> <td>Purple</td> </tr> <tr> <td>6</td> <td>Blue</td> </tr> </tbody> </table> </div> <div class="shortcut"> <div class="key-modifier"> <a class="key"> N </a> </div> <h3> Insert New Card </h3> <p> Pressing \'n\' opens a pop-over that allows you to add a card after the currently selected card. </p> </div> <div class="shortcut"> <div class="key-modifier"> <a class="key"> &lt; </a> <a class="key"> &gt; </a> </div> <h3> Move Card to Adjacent List </h3> <p> Pressing the left or right angle brackets (&lt; and &gt;) will move a card to the adjacent left or right list. </p> </div> <div class="shortcut"> <div class="key-modifier"> <a class="key"> S </a> </div> <h3> Subscribe </h3> <p> Pressing \'s\' will subscribe you to, or unsubscribe you from, a card. Subscribing to a card will give you notifications for most actions to that card. </p> </div> <div class="shortcut"> <div class="key-modifier"> <a class="key"> SPACE </a> </div> <h3> Assign Self </h3> <p> Pressing \'space\' will assign (or unassign) yourself to a card. </p> </div> <div class="shortcut"> <div class="key-modifier"> <a class="key"> Q </a> </div> <h3> My Cards Filter </h3> <p> Pressing the \'q\' key toggles the \'self assigned cards\' filter. </p> </div> <div class="shortcut"> <div class="key-modifier"> <a class="key"> V </a> </div> <h3> Vote </h3> <p> Pressing \'v\' will add (or remove) your vote on a card. </p> </div> <div class="shortcut"> <div class="key-modifier"> <a class="key"> ? </a> </div> <h3> Open Shortcuts Page </h3> <p> Pressing \'?\' will open the shortcuts page. </p> </div> </div> ',
        mini_profile:'<div class="mini-profile-info"> <div class="member-large"> {{#isMe}}<a class="av-btn change js-change-av" href="#">Change</a>{{/isMe}} {{^isMe}}{{#avatarHash}}<a class="av-btn js-view-large" href="#"></a>{{/avatarHash}}{{/isMe}} {{#avatarHash}} <img class="member-avatar" height="50" width="50" src="{{__avatarDomain}}/{{avatarHash}}/50.png" alt="{{#deleted}}This member has deleted their account{{/deleted}}{{^deleted}}{{fullName}} ({{username}}){{/deleted}}" title="{{#deleted}}This member has deleted their account{{/deleted}}{{^deleted}}{{fullName}} ({{username}}){{/deleted}}" /> {{/avatarHash}} {{^avatarHash}} <span class="member-initials" title="{{#deleted}}This member has deleted their account{{/deleted}}{{^deleted}}{{fullName}} ({{username}}){{/deleted}}"> {{^deleted}}{{initials}}{{/deleted}} {{#deleted}}?{{/deleted}} </span> {{/avatarHash}} </div> <div class="info"> <h3 class="bottom" style="margin-right: 40px;"><a class="js-profile" href="/{{username}}">{{fullName}}</a></h3> <p class="quiet bottom">@{{username}}</p> {{#bio}}<p class="quiet bottom ellip">{{{bioHtml}}}</p>{{/bio}} {{#isMe}}<a href="#" class="quiet js-edit-profile">Edit profile info</a>{{/isMe}} </div> </div> ',
        login_popover:'<form action="/authenticate" method="post"> {{#badLogin}} <p class="error">The username or password was incorrect.</p> {{/badLogin}} {{#unconfirmed}} <p class="error">You can\'t sign in until you <a href="/resendValidate">verify your email address</a>.</p> {{/unconfirmed}} <label for="email-login"> Email or username </label> <input type="text" name="user" id="email-login" value="{{email}}" class="js-autofocus" autocomplete="off" autocorrect="off" spellcheck="false" autocapitalize="off"> <label for="password-login"> Password </label> <input type="password" name="password" id="password-login"> <input type="submit" class="primary wide js-password-login" value="Log In"> <p class="quiet" style="margin-top: 16px;"> <a href="/forgot"><strong>Forgot password?</strong></a> </p> <p class="quiet"> New? <a href="/signup{{#returnUrl}}?returnUrl={{returnUrl}}{{/returnUrl}}"><strong>Create an Account.</strong></a> </p> <input type="hidden" name="returnUrl" value="{{returnUrl}}"> </form> <form action="/authenticate_openid" method="post" style="margin-top: 16px;"> <label> Or log in with: </label> <input type="hidden" name="openid_identifier" value="https://www.google.com/accounts/o8/id"> <input type="hidden" name="returnUrl" value="{{returnUrl}}"> <input type="hidden" name="mode" value=""> <input type="hidden" name="immediate" value=""> <a class="button with-icon primary google js-google-login" href=""> <span class="social-icon google-icon"></span> Google </a> {{#openidAccount}} <p>It looks like you haven\'t set a password yet. You can do this from the Account page after logging in with your Google Account.</p> {{/openidAccount}} </form> ',
        header_info_button:'<a class="header-btn header-about" href="#" title="Information"> <span class="app-icon light manual-icon"></span> <span class="count js-unread-announcements">{{count}}</span> </a> ',
        error:'{{#notFound}} <div class="big-message"> <p> Not found. </p> {{^__loggedIn}} <p> This page may be private. Try logging in to see if you can view it. <a class="js-real-link" href="/login?returnUrl={{url}}">Log in</a>. </p> {{/__loggedIn}} {{#__loggedIn}} <p> This page may be private. If someone gave you this link, they may need to invite you to one of their boards or organizations. </p> {{/__loggedIn}} </div> {{/notFound}} {{#boardNotFound}} <div class="big-message"> <p> Board not found. </p> {{^__loggedIn}} <p> This board may be private. Try logging in to see if you can view it. <a class="js-real-link" href="/login?returnUrl={{url}}">Log in</a>. </p> {{/__loggedIn}} {{#__loggedIn}} <p> This page may be private. If someone gave you this link, they may need to invite you to one of their boards or organizations. </p> {{/__loggedIn}} </div> {{/boardNotFound}} ',
        board_menu_item:'<a href="{{url}}" class="clearfix highlight-icon {{#current}}current{{/current}}"> <span class="item-name"> {{name}} {{#orgName}}<span class="sub-name org-name">{{orgName}}</span>{{/orgName}} </span> {{#unreadActionsCount}} <span class="counts"> <span class="count"> <span class="app-icon small-icon activity-icon"></span> <span class="number">{{unreadActionsCount}}</span> </span> </span> {{/unreadActionsCount}} </a> ',
        checklist_add_menu:'<form> <label for="id-checklist">Title</label> <input class="js-checklist-title js-autofocus" type="text" id="id-checklist" value="Checklist"> <input type="submit" class="primary wide confirm js-add-checklist" value="Add"> </form> ',
        search_instant_results:'<div class="window-module js-card-results clearfix hide" style="margin-bottom: 8px;"> <h4 style="padding: 4px 0; border-bottom: 1px solid #dcdcdc"> Cards </h4> <div class="js-list"></div> </div> <div class="window-module js-board-results clearfix hide" style="margin-bottom: 8px;"> <h4 style="padding: 4px 0; border-bottom: 1px solid #dcdcdc"> Boards </h4> <ul class="bold-list js-list"></ul> </div> <div class="window-module js-member-results clearfix hide" style="margin-bottom: 8px;"> <h4 style="padding: 4px 0; border-bottom: 1px solid #dcdcdc"> Members </h4> <ul class="js-list pop-over-member-list"></ul> </div> <div class="js-org-results clearfix hide" style="margin-bottom: 8px;"> <h4 style="padding: 4px 0; border-bottom: 1px solid #dcdcdc"> Organizations </h4> <ul class="bold-list js-list"></ul> </div> <p class="empty-list hide js-no-results">No results</p> ',
        popover_insert_card:'<form> <textarea type="text" class="js-card-name js-autofocus" id="card-name"></textarea> <input type="submit" class="primary js-insert-card" value="Add Card"> <input type="submit" class="js-cancel" value="Cancel"> </form> ',
        popover_add_list:'<form style="position: relative;"> <div style="float: left; width: 180px;"> <label for="list-name">Name</label> <input type="text" class="js-list-name js-autofocus" id="list-name" value="List"> </div> <div href="#" class="button-link setting" style="width: 60px; position: absolute; top: 4px; right: 4px;"> <span class="label">Position</span> <span class="value js-pos-value"></span> <label>Position</label> <select class="js-select-list-pos"></select> </div> <input type="submit" class="primary wide left clear js-add-list" value="Add"> </form> ',
        menu:'<ul class="pop-over-list"> <li><ul class="dynamic-pop-over-list" /></li> {{#menu_cards}} <li><a {{#js_class}}class="{{js_class}}" {{/js_class}} href="{{#url}}{{url}}{{/url}}{{^url}}#{{/url}}">{{name}}</a></li> {{/menu_cards}} </ul> ',
        cardLink:'<a href="{{url}}"{{#name}} title="{{name}}"{{/name}}>#{{idShort}}</a> ',
        archived_card_options:'{{#__ed}} <p class="quiet" style="margin-left: 8px;"> <a href="#" class="js-reopen">{{reOpenText}}</a> {{#canDelete}} - <a href="#" class="js-delete">Delete</a> {{/canDelete}} </p> {{/__ed}} ',
        archive_item:'<p class="item-name float-link"> {{#url}} <a href="{{url}}">{{name}}</a> {{/url}} {{^url}} <span>{{name}}</span> {{/url}} </p> {{#__ed}} <div class="options"> <a href="#" class="button-link js-reopen"> <span class="app-icon small-icon reopen-icon"></span> {{reOpenText}} </a> {{#canDelete}} <a href="#" class="button-link negate js-delete"> <span class="app-icon small-icon remove-icon"></span> Delete </a> {{/canDelete}} </div> {{/__ed}} ',
        card_composer_inline:'<div class="list-card js-composer"> <div class="card-labels clearfix"></div> <textarea class="js-card-title">{{title}}</textarea> <div class="list-card-members"></div> </div> <div class="cc-controls clearfix"> <input type="submit" class="primary confirm js-add-card" value="Add"> <a href="#" class="app-icon close-icon dark-hover cancel js-cancel"></a> <a class="cc-opt app-icon dark-hover menu-icon js-cc-menu" href="#"></a> </div> ',
        member_detail:'<div class="member-detail-modal" idMember="{{id}}"> <div class="window-header clearfix"> <span class="window-header-icon app-icon member-icon"></span> <div class="member-title" attr="fullName"> <h2 class="window-title"> {{fullName}} {{#username}} <span class="quiet" style="margin-left: 3px">({{username}})</span> {{/username}} </h2> </div> </div> <div class="window-main-col clearfix"></div> <div class="window-sidebar"> <a class="profile-member {{#__ed}}ed js-change-avatar-profile{{/__ed}}" href="#"> {{#avatarHash}} <img class="profile-member-avatar" src="{{__avatarDomain}}/{{avatarHash}}/170.png" alt="{{fullName}}"> {{/avatarHash}} {{^avatarHash}} <span class="profile-member-initials">{{initials}}</span> {{/avatarHash}} <span class="change-av-text"> Change Avatar </span> </a> <ul class="sidebar-nav"> <li> {{#__ed}} <a class="js-member-boards" href="/">Boards</a> {{/__ed}} {{^__ed}} <a class="js-member-boards" href="/{{username}}/boards">Boards</a> {{/__ed}} </li> <li> <a class="js-member-profile" href="/{{username}}">Profile</a> </li> {{#__ed}} <li> <a class="js-member-notifications" href="/{{username}}/notifications">Notifications</a> </li> <li> <a class="js-member-account" href="/{{username}}/account">Account</a> </li> <li> <a class="js-log-out" href="/logout">Log Out</a> </li> {{/__ed}} </ul> </div> </div> ',
        popover_card_menu:'<ul class="pop-over-list"> <li> <a class="js-change-card-members" href="#">Members&hellip;</a> </li> <li> <a class="js-edit-labels" href="#">Labels&hellip;</a> </li> <li> <a class="js-due-date" href="#">Due Date&hellip;</a> </li> <li> <a class="js-subscribe highlight-icon" href="#">Subscribe{{#isSubscribed}}d <span class="app-icon small-icon check-icon"></span>{{/isSubscribed}}</a> </li> {{#canVote}} <li> <a class="js-vote highlight-icon" href="#">Vote{{#hasVoted}}d <span class="app-icon small-icon check-icon"></span>{{/hasVoted}}</a> </li> {{/canVote}} </ul> <hr> <ul class="pop-over-list"> <li> <a class="js-move-card" href="#">Move&hellip;</a> </li> <li> <a class="js-copy-card highlight-icon" href="#">Copy&hellip;</a> </li> <li> <a class="js-close-card" href="#">Archive</a> </li> </ul> ',
        card_detail_list:'<p class="inline-block bottom">in list <strong>{{listName}}</strong></p> ',
        board_widget_menu:'{{#visible}} <li><a class="js-hide" href="#">Hide</a></li> {{/visible}} {{^visible}} <li><a class="js-show" href="#">Show{{#isShowAll}} All{{/isShowAll}}</a></li> {{/visible}} {{^isShowAll}} <li><a class="js-hide-all" href="#">Hide All</a></li> {{/isShowAll}} ',
        popover_change_set_password:'<form> {{#hasPassword}} <label for="o_password"> Old Password </label> <input id="o_password" type="password" name="oldpassword" value=""> {{/hasPassword}} <label for="password1"> {{#hasPassword}} New {{/hasPassword}} Password </label> <input id="password1" type="password" name="password" value=""> <label for="password2"> {{#hasPassword}} New {{/hasPassword}} Password (again) </label> <input id="password2" type="password" name="password2" value=""> <p id="password-error" class="error"></p> <input type="submit" class="primary js-save-changes" value="Save"> </form> {{^hasPassword}} <hr> <p class="quiet bottom"> You haven\'t set a password yet. You can set a password so you can log onto Trello with just your username or email address. </p> {{/hasPassword}} ',
        members_voted:' <div class="list-voters clearfix {{#fewMembers}}compact{{/fewMembers}}"> {{#members}} <div class="voter"> <div class="member no-menu"> {{>member}} </div> {{#fewMembers}} <p class="title"> {{fullName}} <span class="quiet">({{username}})</span> </p> {{/fewMembers}} </div> {{/members}} </div> {{#moreMembers}} <a href="#" class="show-more compact js-more-members-voted"> Show all voters ({{lengthDiff}} more) </a> {{/moreMembers}} {{#canVote}} <hr> <a class="js-{{#voted}}un{{/voted}}vote button vote-button {{#voted}}primary{{/voted}}">Vote{{#voted}}d{{/voted}}</a> {{/canVote}} ',
        popover_move_list:'<div class="button-link setting" style="width: 255px; max-width: 255px; margin-bottom: 8px;"> <span class="label">Position</span> <span class="value js-pos-value"></span> <label>Position</label> <select class="js-select-list-pos"></select> </div> <input type="submit" class="primary wide js-commit-position" value="Move"/> ',
        announcement:'<div class="announcement {{type}}"> <h6> {{#url}}<a target="_blank" href="{{url}}">{{title}}</a>{{/url}} {{^url}}{{title}}{{/url}} </h6> <div class="content">{{{html}}}</div> <p class="quiet bottom announce-meta"> <a href="#" class="dismiss js-dismiss">{{dismissText}}</a> - <a href="#" class="dismiss js-all">See all announcements</a> </p> </div> <hr> ',
        votes:'<a class="badge vote-badge{{#__ed}} js-show-votes clickable{{/__ed}}{{#voted}} voted{{/voted}}" href="#"> <span class="app-icon small-icon vote-icon badge-image"></span>{{#nVotes}}{{nVotes}} vote{{^singleVote}}s {{/singleVote}} {{/nVotes}} {{#voted}} {{^justYourVote}} (with you){{/justYourVote}} {{#justYourVote}} (you){{/justYourVote}} {{/voted}} </a> ',
        popover_select_members:'<input type="text" class="js-search-mem js-autofocus" placeholder="Search members"/> <ul class="pop-over-member-list checkable js-mem-list"> {{#allMembers}} {{>select_member}} {{/allMembers}} </ul> ',
        popover_helper_new_board_vis:"<p class=\"bottom\"> Choosing 'Members' will make the board visible only to those invited to the board. If you select an organization in 'Add to Organization' (if available), choosing 'Organization' will make the board visible to those in the selected organization. Choosing 'Public' will make the board visible to anyone with a link to the board. </p> ",
        popover_checklist_menu:'<ul class="pop-over-list"> <li><a class="js-delete-checklist" href="#">Delete&hellip;</a></li> </ul> ',
        card_detail_date:'<a class="badge due-date-badge {{dueClass}} {{#__ed}} clickable js-change-due-date{{/__ed}}" href="#" title="{{titleDueDate}}"> <span class="app-icon small-icon {{lightClass}} date-icon badge-image"></span>{{longDateText}} </a> ',
        org_boards_list:'<div class="window-module"> <div class="bold-list boards-list gutter js-list-boards"></div> </div> {{#isOrgMember}} {{#displayAddBoard}} <div class="window-module"> <a class="button-link gutter js-add-board" href="#"> <span class="app-icon small-icon board-icon"></span> Add Board </a> </div> {{/displayAddBoard}} {{/isOrgMember}} ',
        member_application:'<div class="details"> <h5> {{#identifier}}{{identifier}}{{/identifier}} {{^identifier}}Unknown Application{{/identifier}} </h5> <p class="quiet"> {{permissions}} </p> <p class="quiet"> Approved: {{dateApproved}}<br> {{#neverExpires}} Never Expires {{/neverExpires}} {{^neverExpires}} Expires: {{dateExpires}} {{/neverExpires}} </p> </div> <input type="button" class="js-revoke" value="Revoke"> ',
        popover_filter_pos_results:'<ul class="pop-over-list navigable normal-weight js-pos-results"> {{#keywordList}} <li> <a class="js-select-pos-keyword" name="{{value}}" href="#"><strong>{{natural}}</strong> of list <strong>{{currentListName}}</strong></a> </li> {{/keywordList}} {{#posList}} <li> <a class="js-select-pos-pos" name="{{value}}" href="#"><strong>{{natural}}</strong> in list <strong>{{currentListName}}</strong></a> </li> {{/posList}} {{#listList}} <li> <a class="js-select-pos-list" name="{{id}}" href="#"><strong>{{currentPos}}</strong> {{currentPosPrep}} list <strong>{{name}}</strong></a> </li> {{/listList}} </ul> ',
        checklist_inline:' checklist "{{name}}" ',
        board_menu:'{{#__loggedIn}}<li><a class="js-settings" href="#">Settings</a></li>{{/__loggedIn}} <li><a class="js-members" href="#">Members</a></li> {{#showBoardDetailFunctions}} <li><a class="js-archived-items" href="#">Archived Items</a></li> <li><a class="js-labels" href="#">Labels</a></li> <li><a class="js-activity" href="#">Recent Activity</a></li> {{/showBoardDetailFunctions}} {{#__loggedIn}} {{#__ed}} {{#showBoardDetailFunctions}} <hr> <li><a class="js-add-list" href="#">Add List</a></li> <li><a class="js-board-menu-filter-cards" href="#">Search and Filter Cards</a></li> {{/showBoardDetailFunctions}} {{/__ed}} <hr> <li><a class="js-copy-board" href="#">Copy Board</a></li> {{#pinned}}<li><a class="js-unpin-board" href="#">Unpin from Header Menu</a></li>{{/pinned}} {{^pinned}}<li><a class="js-pin-board" href="#">Pin to Header Menu</a></li>{{/pinned}} <li><a class="js-share" href="#">Share, Print, and Export</a></li> {{#__own}} <li><a class="js-close-board" href="#">Close Board</a></li> {{/__own}} {{/__loggedIn}} ',
        manage_members:'{{#canInvite}} <div class="manage-member-search js-search-section"> <input type="text" class="js-search-input js-autofocus" placeholder="{{placeholder}}" style="margin-bottom: 0;"> <div class="spinner small hide js-loading"></div> </div> {{/canInvite}} <div class="manage-member-section hide js-board-members"> <ul class="js-list pop-over-member-list"></ul> </div> {{#canInvite}} <div class="manage-member-section hide js-search-results"> <h4>Results</h4> <ul class="js-list pop-over-member-list"></ul> </div> <div class="manage-member-section hide js-no-results"> <p class="quiet center" style="padding: 16px 4px;">No results</p> </div> <div class="manage-member-section hide js-org-members"> <h4>{{orgName}} Members</h4> <ul class="pop-over-member-list clearfix js-list{{#orgMemsView}} collapsed{{/orgMemsView}}" {{#orgMemsView}}style="margin-bottom: 8px;"{{/orgMemsView}}></ul> <a href="#" class="quiet-button js-add-all-org-members">Add All Organization Members (<span class="js-num-org-mem"></span>)</a> <a href="#" class="quiet-button js-more-org-members hide">View All Members</a> {{^permissionLevel_private}} {{#selfJoin_false}}<a href="#" class="quiet-button js-enable-self-join">Allow Members to Join</a>{{/selfJoin_false}} {{/permissionLevel_private}} </div> <div class="manage-member-section hide js-pending-invites"> <h4>Pending Invites</h4> <div class="js-list"></div> </div> {{/canInvite}} ',
        upgrade:'Update available!<br /> {{^stopped}}Trello will automatically update itself by reloading in {{timeInMinutes}} minute{{#plural}}s{{/plural}}.<br />{{/stopped}} {{#stopped}}When you\'re ready&hellip;<br />{{/stopped}} <a class="js-upgrade" href="#">{{^stopped}}Reload now{{/stopped}}{{#stopped}}Okay, NOW reload.{{/stopped}}</a> {{^stopped}}<a class="js-stop-upgrade" href="#">Wait!</a>{{/stopped}} ',
        manual_about:"<div class=\"markeddown\"> <p> Trello is a collaboration tool that organizes your projects into boards. In one glance, Trello tells you what's being worked on, who's working on what, and where something is in a process. </p> <h2>How it works.</h2> <p> A Trello board is some product or project that is under continuous development, though a board can have a variety of uses and mean different things. Boards are made up of multiple lists. Generally, lists on the left are the start of a workflow and lists on right are the end. Lists contain cards. Cards represent the basic unit of a board, for instance: a new feature, a bug, a story lead, a legal case, a client, research for a paper, a potential employee, or a customer support issue. Cards move from list to list to indicate progression. Board members can add themselves to cards, start conversations on cards, create checklists on cards, and so on. </p> <p> To give you an example, our board consists of five lists ordered left to right: <em>Ideas</em>, <em>Design</em>, <em>Development</em>, <em>Implemented</em>, and <em>Deployed</em>. For us, a card is usually a bug or a feature. A feature card that has finished being designed will be moved from the <em>Design</em> list to the <em>Development</em> list, and so on down the line. When we push bad code, we move cards from <em>Deployed</em> to <em>Development</em>. We sort cards vertically in a list to designate priority, the top being the highest priority. The cards with bad code are usually at the top. One look at the board will tell you where a feature or bug is in the development cycle. </p> <p> That's how we use a board. You'll likely have your own lists, your own concept of a card, and your own workflow. </p> </div> ",
        header_account_menu:'<ul class="pop-over-list"> <li> <a class="js-change-name-and-bio" href="#"> Change Name, Initials, or Bio </a> </li> <li> <a class="js-change-avatar" href="#"> Change Avatar </a> </li> <li> <a class="js-change-password" href="#"> {{#hasPassword}}Change Password{{/hasPassword}}{{^hasPassword}}Set Password{{/hasPassword}} </a> </li> <li> <a class="js-change-email-freq" href="#"> Change Notification Email Frequency </a> </li> </ul> <hr> <p class="bottom"> <a class="quiet-button" href="{{memberAccountUrl}}">See all options</a> </p> ',
        popover_rename_board:'<form> <label>Name</label> <input type="text" class="js-board-name js-autofocus" value="{{boardName}}"> <input type="submit" class="primary wide js-rename-board" value="Rename"> </form> ',
        check_item:'<div class="checkbox {{#__ed}}enabled{{/__ed}}">&#x2713;</div> <div class="check_item_text {{#__ed}}editable{{/__ed}}" attr="name"> <p class="current hide-on-edit">{{name}}</p> {{#__ed}} <div class="edit delete convert"> <input type="text" class="field full single-line"></input> </div> <p class="edits-warning quiet">You have unsaved edits on this field. <a href=\'#\' class=\'js-view-edits\'>View edits</a> or <a href=\'#\' class=\'js-discard-edits\'>discard</a>.</p> {{/__ed}} </div> ',
        member_invitation_list:'<div class="window-module invitations"> <div class="window-module-title"> <span class="app-icon invitation-icon window-module-title-icon"></span> <h3>Pending {{model}} Invitations</h3> </div> <div class="bold-list gutter js-list-invitations"> </div> </div> ',
        board_new:'<form> <div style="margin-bottom: 16px;"> <label>Title</label> <input type="text" name="name" class="non-empty js-autofocus" placeholder="Untitled Board"> </div> <div style="margin-bottom: 12px;"> <div class="clearfix"> <label class="left" style="margin-right: 8px;">Organization</label> {{#canAddToOrgs}} <a href="#" class="app-icon small-icon manual-icon dark-hover js-helper-add-org"></a> {{/canAddToOrgs}} </div> {{^canAddToOrgs}} <p style="margin-bottom: 16px;" class="quiet"> Organizations make sharing and working within a group even easier. It doesn\'t look like you are a member of any organizations. <a href="/org/create">Create an organization?</a> </p> {{/canAddToOrgs}} {{#canAddToOrgs}} <select name="org-id"> <option value="">(none)</option> {{#orgs}} <option value="{{id}}"{{#selectOrg}} selected{{/selectOrg}}>{{displayName}}</option> {{/orgs}} </select> {{/canAddToOrgs}} </div> <div style="margin-bottom: 8px;"> <div class="clearfix"> <label class="left" style="margin-right: 8px;">Visibility</label> <a href="#" class="app-icon small-icon manual-icon dark-hover js-helper-vis"></a> </div> <select name="permissionLevel"> <option value="private"{{#permissionLevel_private}} selected{{/permissionLevel_private}}>Members</option> {{#canAddToOrgs}} <option value="org"{{^hasOrg}} disabled{{/hasOrg}}{{#permissionLevel_org}} selected{{/permissionLevel_org}}>Organization</option> {{/canAddToOrgs}} <option value="public"{{#permissionLevel_public}} selected{{/permissionLevel_public}}>Public</option> </select> </div> {{#isCopyBoard}} <div class="check-div clearfix"> <input type="checkbox" id="idKeepCards" name="cards" checked> <label for="idKeepCards">Keep Cards</label> </div> {{/isCopyBoard}} <div class="clear"> <input type="submit" class="primary wide js-submit" value="Create Board"> </div> </form> ',
        board_activity:'<div class="window-header-utils"> <a class="app-icon close-icon dark-hover js-close-window" href="#" title="Close this dialog window.">Close</a> </div> <div class="window-header clearfix"> <span class="window-header-icon app-icon activity-icon" href="#"></span> <div class="window-title"> <h2 class="window-title-text"> Board Activity </h2> </div> </div> <div class="window-main-col"> <div class="list-activity"></div> <a class="show-more js-more-actions" href="#">Load More Activity</a> </div> ',
        desktop_notification:'<div class="phenom"> <div class="member"> {{#member}} {{#avatarHash}} <img class="member-avatar" src="{{__avatarDomain}}/{{avatarHash}}/30.png" alt="{{fullName}}" title="{{fullName}} ({{username}})" /> {{/avatarHash}} {{^avatarHash}} <span class="member-initials" title="{{fullName}} ({{username}})">{{initials}}</span> {{/avatarHash}} {{#deleted}} <span class="member-initials" title="This member has deleted their account"> ? </span> {{/deleted}} {{/member}} </div> <div class="phenom-desc"> {{#entities}} {{>entity}} {{/entities}} </div> </div> ',
        popover_helper_add_member:"<p class=\"bottom\"> Search for existing users or add email addresses for new users, separating entries with a comma. Clicking one or more users to add them to the invite list, then click the green 'Invite' button to send the invitations. </p> ",
        board_closed:'<div class="big-message"> <p> {{name}} is closed. </p> </div> ',
        "menu-base":'<ul class="pop-over-list"> <li><ul class="boards-pop-over-list" /></li> {{{content}}} </ul> ',
        popover_avatar:'{{#uploadedAvatarHash}} <a class="avatar-option js-use-uploaded-avatar {{#avatarSource_upload}}active{{/avatarSource_upload}}" href="#"> <img class="pic" src="{{__avatarDomain}}/{{uploadedAvatarHash}}/50.png"> <span class="text"> Uploaded Picture <span class="app-icon small-icon check-icon"></span> </span> </a> <hr> {{/uploadedAvatarHash}} <div class="js-grav hide"> <a class="avatar-option js-use-gravatar {{#avatarSource_gravatar}}active{{/avatarSource_gravatar}}" href="#"> <img class="pic" src="https://secure.gravatar.com/avatar/{{gravatarHash}}.jpg?s=50&r=PG&d=404"> <span class="text"> Gravatar <span class="app-icon small-icon check-icon"></span> </span> </a> <hr> </div> <a class="avatar-option js-no-avatar {{#avatarSource_none}}active{{/avatarSource_none}}" href="#"> <span class="pic member"> <span class="member-initials">{{initials}}</span> </span> <span class="text"> Initials (no avatar) <span class="app-icon small-icon check-icon"></span> </span> </a> <hr> <div class="uploader ios-hide" style="margin: 12px 4px 8px;"> <p class="error hide js-file-too-large">Images can not be larger than 10mb.</p> <form class="realfile" action="/api/member/{{id}}" method="post" enctype="multipart/form-data"> <input type="hidden" name="token" value="" /> <input type="hidden" name="method" value="uploadAvatar" /> <input type="hidden" name="format" value="http" /> <input type="file" name="upload" class="js-upload-avatar" style="margin-bottom: 0;" tabindex="-1" /> </form> <a class="button-link fakefile js-fakefile"> <span class="app-icon small-icon member-icon"></span> Upload a {{#uploadedAvatarHash}} new {{/uploadedAvatarHash}} picture </a> </div> ',
        sync_error:'You have been disconnected from the Trello Server for too long.<br /> <a href="#" onclick="window.location.reload();">Reload now</a> ',
        date_picker:'<form class="dpicker-widget clearfix"> <input type="text" class="hide js-fuzzy-dt" placeholder="Fuzzy dates like \'next week\' or \'tomorrow at 7pm\'"> <div class="dt clearfix"> <div class="date"> <p style="margin-bottom: 4px;"> <strong>Date</strong> </p> <input type="text" class="js-dpicker-date-input" placeholder="Enter date"> </div> <div class="time"> <p style="margin-bottom: 4px;"> <strong>Time</strong> </p> <input type="text" class="js-dpicker-time-input" placeholder="Enter time" value="12:00pm"> <select class="js-dpicker-time-select"></select> </div> </div> <div class="pickers"> <div class="js-dpicker-cal"></div> </div> <div class="dpicker-confirm-btns clearfix"> <input type="submit" class="primary wide confirm js-save-edit" value="Save"> {{#hasDueDate}} <a href="#" class="button negate remove-date js-remove-date">Remove</a> {{/hasDueDate}} </div> </form> ',
        popover_confirm_close_board:'<p> You can re-open the board by clicking the "Boards" menu from the header, selecting "View Closed Boards", finding the board and clicking "Re-open". </p> <input type="submit" class="js-close-board primary" value="Close Board"> <input type="submit" class="js-cancel" value="Keep Open"> ',
        member_avatar:'<div class="member"> {{#avatarHash}} <img class="member-avatar" src="{{__avatarDomain}}/{{avatarHash}}/30.png" alt="{{fullName}}"> {{/avatarHash}} {{^avatarHash}} <p class="member-initials">{{initials}}</p> {{/avatarHash}} </div> ',
        board_labels_static:'{{#labelNames}} <div class="labels-static"> <p class="card-label green-label"> {{green}} </p> <p class="card-label yellow-label"> {{yellow}} </p> <p class="card-label orange-label"> {{orange}} </p> <p class="card-label red-label"> {{red}} </p> <p class="card-label purple-label"> {{purple}} </p> <p class="card-label blue-label"> {{blue}} </p> </div> {{/labelNames}} ',
        popover_change_board_org:'<form> <label>Organization</label> <select class="js-org"> <option value="" {{^orgs}}selected{{/orgs}}>(none)</option> {{#orgs}} <option value="{{id}}"{{#select}}selected{{/select}}>{{displayName}}</option> {{/orgs}} </select> <input type="submit" class="js-submit wide primary" value="Change"> </form> ',
        member_boards_list:'<div class="window-module"> <div class="window-module-title"> <span class="app-icon window-module-title-icon{{^url}} board-icon{{/url}}{{#url}} org-icon{{/url}}"></span> <h3> {{displayName}} </h3> {{#permissionLevel_public}}<span class="app-icon small-icon public-icon"></span>{{/permissionLevel_public}} {{#permissionLevel_private}}<span class="app-icon small-icon private-icon"></span>{{/permissionLevel_private}} {{#url}}<a style="margin: 0 0 0 4px;" class="inline-block quiet js-view-org-profile" href="{{url}}">Profile</a>{{/url}} <span class="js-show-all-boards-block quiet hidden">{{#hasMore}} - <a href="#" class="inline-block js-show-all-org-boards">Show all boards</a>{{/hasMore}} </span> </div> {{#empty}}<p class="empty-list">No boards</p>{{/empty}} <ul class="boards-list bold-list gutter js-list-boards"></ul> </div> {{#showAll}} <div class="window-module"> <div class="window-module-title"> <h3>More boards from {{displayName}}</h3> </div> <ul class="boards-list bold-list gutter js-list-more-boards"></ul> </div> {{/showAll}} {{#isMe}} <div class="window-module"> <a class="button-link gutter js-add-board" href="#"> <span class="app-icon small-icon board-icon"></span> Add Board </a> </div> {{/isMe}} ',
        attachment:'<li> <a href="{{url}}" target="_blank">{{name}}</a> {{#size}}<span class="quiet size">{{size}}</span>{{/size}} <p class="meta quiet"> {{#date}}<span class="date" dt="{{date}}"></span>{{/date}} <span> - </span> {{#__ed}}<a href="#" class="js-delete-attachment">Delete</a>{{/__ed}} </p> </li> ',
        board_labels:'{{#labelNames}} <div class="relative"> <div class="card-label green-label"></div> <input type="text" class="js-label-title" name="green" value="{{green}}" placeholder="No name"> </div> <div class="relative"> <div class="card-label yellow-label"></div> <input type="text" class="js-label-title" name="yellow" value="{{yellow}}" placeholder="No name"> </div> <div class="relative"> <div class="card-label orange-label"></div> <input type="text" class="js-label-title" name="orange" value="{{orange}}" placeholder="No name"> </div> <div class="relative"> <div class="card-label red-label"></div> <input type="text" class="js-label-title" name="red" value="{{red}}" placeholder="No name"> </div> <div class="relative"> <div class="card-label purple-label"></div> <input type="text" class="js-label-title" name="purple" value="{{purple}}" placeholder="No name"> </div> <div class="relative"> <div class="card-label blue-label"></div> <input type="text" class="js-label-title" name="blue" value="{{blue}}" placeholder="No name"> </div> {{/labelNames}} <input type="submit" class="primary wide js-save" value="Save"> ',
        member_on_card_menu:'{{#__ed}} <li><a class="js-remove-member">Remove from Card</a></li> {{/__ed}} ',
        edit_controls:'<div class="edit-controls clearfix"> <input type="submit" class="primary confirm js-save-edit" value="Save"> <a href="#" class="app-icon close-icon dark-hover cancel js-cancel-edit"></a> <a href="#" class="option delete js-delete-item">Delete</a> <a href="#" class="option convert js-convert-item-to-card">Convert to Card</a> </div> ',
        popover_signup:'<form action="/authenticate_openid" method="post" class="clearfix" style="margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px solid #bfbfbf;"> <label> Sign up with: </label> <input type="hidden" name="openid_identifier" value="https://www.google.com/accounts/o8/id"> <input type="submit" class="primary js-google-confirm-account" style="margin-top: 4px; width: 100%;" value="Google Account"> <input type="hidden" name="returnUrl" value="{{returnUrl}}"> </form> <form action="/signup" method="post" class="clearfix" style="margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px solid #bfbfbf;"> <h3>Or use email and password</h3> <label for="display-name-create"> Full Name </label> <input type="text" name="fullName" id="display-name-create" value="{{fullName}}"> <div class="js-use-diff-email"> <label for="email-create"> Email </label> <input type="email" name="email" id="email-create" value="{{email}}" autocomplete="off" autocorrect="off" spellcheck="false" autocapitalize="off"> </div> <label for="password-create"> Password </label> <input type="password" name="password" id="password-create"> <input type="hidden" name="returnUrl" value="{{returnUrl}}"> <input type="submit" class="primary js-confirm-email-account" style="width: 100%;" value="Create New Account"> </form> <form> <p class="clear" style="margin-bottom: 0;"> Already have an account? <a href="/login{{#returnUrl}}?returnUrl={{returnUrl}}{{/returnUrl}}"><strong>Log In</strong></a> to accept this invitation. </p> <input type="hidden" name="returnUrl" value="{{returnUrl}}"> </form> ',
        board_inline:'<span>the board</span> <a href="{{boardUrl}}" class="inline-object"> {{name}} </a> ',
        card_detail_subscribe:'<a class="button-link {{#subscribed}}is-on {{/subscribed}} js-{{#subscribed}}un{{/subscribed}}subscribe"> <span class="app-icon small-icon follow-icon"></span> Subscribe <span class="on"><span class="app-icon small-icon light check-icon"></span></span> </a> ',
        member_account:'<div class="window-module clearfix"> <a class="big-link js-change-name-and-bio" href="#"> <span class="text">Change Name, Initials, or Bio</span> </a> <a class="big-link js-change-email" href="#"> <span class="text">Change Email Address</span> </a> <a class="big-link js-change-avatar" href="#"> <span class="text">Change Avatar</span> </a> <a class="big-link js-change-password" href="#"> <span class="text">{{#hasPassword}}Change {{/hasPassword}}{{^hasPassword}}Set {{/hasPassword}}Password</span> </a> <a class="big-link js-change-email-freq" href="#"> <span class="text">Change Notification Email Frequency</span> </a> <a class="big-link js-toggle-cb-mode" href="#"> <span class="text">{{#cbEnabled}}Disable {{/cbEnabled}}{{^cbEnabled}}Enable {{/cbEnabled}}Color Blind Friendly Mode</span> </a> </div> <div class="window-module"> <div class="window-module-title"> <h3>Applications</h3> </div> <div class="member-applications"> <div class="spinner loading"></div> </div> </div> <a class="quiet-button gutter js-confirm-delete-member" href="#" style="margin-top: 32px;">Delete your account?</a> ',
        popover_checklist_delete_confirm:'<p> <strong>WARNING:</strong> Deleting a checklist is permanent and there is no way to get it back. </p> <input type="submit" class="negate wide js-delete-checklist" value="Delete"> ',
        list_guide_link:'<p class="list-link"> <strong>{{listName}}</strong><br> <span class="list-link-sub">{{countStr}}</span> </p> ',
        action:'{{#member}} <div class="member js-show-mem-menu"> {{>member}} </div> {{/member}} {{^member}} <div class="member no-menu"><span class="member-initials quiet">?</span></div> {{/member}} <div class="phenom-desc" {{#type}}actionType="{{type}}"{{/type}}> {{#member}}<a class="inline-object js-show-mem-menu" href="#">{{fullName}}</a>{{/member}} {{^member}}<span class="quiet">[deleted account]</span>{{/member}} {{#entities}} {{>entity}} {{/entities}} {{^hasMoreThanOneChild}} {{#children}} {{#entities}}{{>entity}}{{/entities}} {{/children}} {{/hasMoreThanOneChild}} {{#hasMoreThanOneChild}} <ul> {{#children}} <li>{{#entities}}{{>entity}}{{/entities}}</li> {{/children}} </ul> {{/hasMoreThanOneChild}} </div> <p class="phenom-meta quiet"> {{#date}}<span class="date" dt="{{date}}"></span>{{/date}} {{^date}}<span class="spinner small left" style="margin-right: 4px;"></span> Sending... {{/date}} {{#board}} - on board <a class="bold" href="{{url}}">{{name}}</a> {{#permissionLevel_private}} <span title="This board is private. The board (and board actions) are only visible to members of this board." class="app-icon small-icon private-icon"></span> {{/permissionLevel_private}} {{#permissionLevel_org}} <span title="This board visible to an organization. The board (and board actions) are only visible to members of the organization" class="app-icon small-icon org-private-icon"></span> {{/permissionLevel_org}} {{#permissionLevel_public}} <span title="This board is public. The board (and board actions) are visible to the whole Internet." class="app-icon small-icon public-icon"></span> {{/permissionLevel_public}} {{/board}} {{#organization}} - on organization <a class="bold" href="{{url}}">{{name}}</a> {{#permissionLevel_private}} <span title="This organization is private. The organization (and organization actions) are only visible to members of this organization." class="app-icon small-icon private-icon"></span> {{/permissionLevel_private}} {{#permissionLevel_public}} <span title="This organization is public. The organization (and organization actions) are visible to the whole Internet." class="app-icon small-icon public-icon"></span> {{/permissionLevel_public}} {{/organization}} {{#canDelete}} - <a href="#" class="js-confirm-delete-action">Delete</a> {{/canDelete}} </p> ',
        select_member:'<li class="item {{className}}{{#isActive}} active{{/isActive}}{{#isInvitable}} invitable{{/isInvitable}}"> <a href="{{#url}}{{url}}{{/url}}{{^url}}#{{/url}}" class="name js-select-member" idMember="{{id}}"> <span class="member">{{> member}}</span> <span class="full-name"> {{fullName}} (<span class="username">{{username}}</span>) {{#extraText}}<span class="quiet">({{extraText}})</span>{{/extraText}} </span> <span class="app-icon small-icon check-icon checked-icon"></span> </a> </li> ',
        invitation:'<div class="phenom invitation"> {{#MemberInviter}} <div class="member no-menu"> {{>member}} </div> {{/MemberInviter}} <div class="phenom-desc"> <p> {{#MemberInviter}} <span class="phenom-author"> {{fullName}} </span> created an invitation to {{/MemberInviter}} <span class="invitee"> {{#MemberInvited}}{{>member_inline}}{{/MemberInvited}} {{^MemberInvited}}{{email}}{{^email}}someone new{{/email}}{{/MemberInvited}} </span> </p> </div> <p class="phenom-meta quiet"> {{#dateExpires}} <span class="expiration-date">Expires <span class="date" dt="{{dateExpires}}"></span></span> {{/dateExpires}} {{#canRemove}} - <a href="#" class="inline-block js-remove-invitation">Delete Invite</a> {{/canRemove}} </p> </div> ',
        popover_change_position:'<div class="button-link setting" style="width: 163px; margin-right: 8px;"> <span class="label">List</span> <span class="value js-list-value"></span> <label>List</label> <select class="js-select-list"></select> </div> <div class="button-link setting" style="width: 70px;"> <span class="label">Position</span> <span class="value js-pos-value"></span> <label>Position</label> <select class="js-select-position"></select> </div> ',
        member_notifications:'<div class="window-module"> <div class="window-module-title"> <span class="app-icon notification-icon window-module-title-icon"></span> <h3>Notifications</h3> <a class="inline-block js-change-email-freq" href="#"></a> </div> {{#empty}}<div class="empty-list">No Notifications</div>{{/empty}} <div class="list-notifications"></div> <a class="show-more js-more-notifications" href="#">Load More Notifications</a> </div> ',
        member_boards:'<div class="js-boards-list"></div> {{#__own}} <a class="quiet-button gutter" href="/org/create" style="margin-top: 32px;" title="Organizations make sharing and working within a group even easier.">Create an Organization</a> {{/__own}} ',
        list_inline:' list "{{name}}" ',
        popover_selector_menu:'<ul class="pop-over-list"> <li> <a href="#" class="js-mem-selector">Members&hellip;</a> </li> <li> <a href="#" class="js-label-selector">Labels&hellip;</a> </li> <li> <a href="#" class="js-pos-selector">Position&hellip;</a> </li> <li> <a href="#" class="js-copy-from">Copy From&hellip;</a> </li> </ul> ',
        popover_change_user_info:'<form> <p id="account-error" class="error"></p> <div class="field"> <label for="fullName">Full Name</label> <input id="fullName" type="text" name="fullName" value="{{fullName}}"> </div> <div class="field"> <label for="initials">Initials</label> <input id="initials" type="text" name="initials" value="{{initials}}"> </div> <div class="field"> <label for="username">Username</label> <input id="username" type="text" name="username" value="{{username}}" required autocomplete="off" autocorrect="off" spellcheck="false" autocapitalize="off"> </div> <div class="field"> <label for="bio">Bio</label> <textarea id="bio" type="text" name="bio">{{bio}}</textarea> </div> <input type="submit" class="primary js-save-changes" value="Save"> </form> <hr> <p class="quiet bottom"> Your initials are used in place of your avatar if your avatar is not set. Usernames require a minimum of 3 characters, alphanumeric only. </p> ',
        card_copy:'<form> <label>Title</label> <textarea name="name" class="js-autofocus" style="margin-bottom: 12px;">{{name}}</textarea> <p style="margin-bottom: 4px;"><strong>Keep&hellip;</strong></p> <div class="check-div clearfix"> <input id="idKeepChecklists" type="checkbox" name="checklists" checked> <label for="idKeepChecklists">Checklists <span class="quiet">({{numChecklists}})</span></label> </div> <div class="check-div clearfix"> <input id="idKeepLabels" type="checkbox" name="labels" checked> <label for="idKeepLabels">Labels <span class="quiet">({{numLabels}})</span></label> </div> <div class="check-div clearfix"> <input id="idKeepMembers" type="checkbox" name="members" checked> <label for="idKeepMembers">Members <span class="quiet">({{numMembers}})</span></label> </div> <div class="check-div clearfix"> <input id="idKeepAttachments" type="checkbox" name="attachments" checked> <label for="idKeepAttachments">Attachments <span class="quiet">({{ numAttachments }})</span></label> </div> <div class="check-div clearfix"> <input id="idKeepComments" type="checkbox" name="comments" checked> <label for="idKeepComments">Comments <span class="quiet">({{ numComments }})</span></label> </div> <input type="submit" class="primary wide js-submit" value="Create Card"> </form> ',
        member_organization:'<a class="clearfix link-item highlight-icon" href="{{url}}"> <span class="item-name">{{displayName}}</span> {{#permissionLevel_public}}<span class="app-icon small-icon public-icon"></span>{{/permissionLevel_public}} {{#permissionLevel_private}}<span class="app-icon small-icon private-icon"></span>{{/permissionLevel_private}} </a> ',
        list:'<div class="list-header clearfix"> <span class="app-icon small-icon list-icon"></span> <div class="list-title non-empty clearfix {{#__ed}} editable{{/__ed}}" attr="name"> <h2 class="hide-on-edit{{#__ed}} current {{/__ed}}">{{name}}</h2> <p class="num-cards"></p> {{#__ed}} <div class="edit edit-heavy clearfix"> <textarea type="text" class="field single-line"></textarea> </div> {{/__ed}} {{#__ed}} <a href="#" class="app-icon small-icon dark-hover menu-icon js-open-list-menu"></a> {{/__ed}} </div> </div> <div class="list-card-area"> <div class="list-gradient-top"></div> <div class="list-gradient-bottom"></div> <div class="list-cards fancy-scrollbar clearfix {{#__ed}}js-sortable{{/__ed}}"></div> </div> {{#__ed}} <a class="open-card-composer js-open-card-composer" href="#">Add a card...</a> {{/__ed}} ',
        connect_failed:'{{msg}}<br /> {{#allowReset}} <a href="#" onclick="window.ajaxQueueReset(); return false;">Retry</a> {{/allowReset}} <a href="#" onclick="window.location.reload()">Reload page</a> ',
        org_inline:'<span>the organization</span> <a href="{{organizationUrl}}" class="inline-object"> {{name}} </a> ',
        popover_confirm_org_delete:'<p> Deleting an organization is permanent. Are you sure you want to delete this organization? There is no undo. Boards with this organization won\'t be deleted. Your boards in this organization will appear in your personal boards list. </p> <input type="submit" class="js-delete-org" value="Delete"> <input type="submit" class="js-cancel-delete" value="Never Mind"> ',
        member_email_freq:'{{#minutesBetweenSummaries_-1}} Don\'t send emails. {{/minutesBetweenSummaries_-1}} {{#minutesBetweenSummaries_60}} Send emails periodically. {{/minutesBetweenSummaries_60}} {{#minutesBetweenSummaries_1}} Send emails instantly. {{/minutesBetweenSummaries_1}} <span class="quiet">(change)</span> ',
        atMention:'<span class="atMention{{#isMe}} me{{/isMe}}" title="{{fullName}}">{{atMention}}</span> ',
        member_application_list:'{{^hasTokens}} <p class="big-link none"> No applications are using your Trello account. </p> {{/hasTokens}} {{#hasTokens}} <div class="applications gutter"></div> {{/hasTokens}} ',
        "list-menu":'{{#__ed}} <li><a class="js-add-card" href="#">Add Card...</a></li> <li><a class="js-move-list" href="#">Move List...</a></li> <li><a class="js-close-list" href="#">Archive This List</a></li> {{/__ed}} ',
        announcements_list:'<div class="window-header-utils"> <a class="app-icon close-icon dark-hover js-close-window" href="#" title="Close this dialog window.">Close</a> </div> <div class="window-header clearfix"> <span class="window-header-icon app-icon board-icon" href="#"></span> <div class="window-title"> <h2 class="window-title-text inline-block"> Announcements </h2> </div> </div> <div class="window-main-col"> <div class="window-module"> <hr style="margin-top: 0;"> {{#announcements}} {{>announcement}} {{/announcements}} </div> <p class="quiet bottom" style="margin: 0 8px 4px;"> For more feature announcements and updates, check out the <a target="_blank" class="js-real-link js-blog" href="http://blog.trello.com/">Trello Blog</a> and follow us on <a target="_blank" class="js-real-link js-t" href="https://www.twitter.com/trello" title="@trello on Twitter">Twitter</a> and <a target="_blank" class="js-real-link js-fb" href="https://www.facebook.com/TrelloApp" title="Trello on Facebook">Facebook</a>. </p> </div> ',
        manual_privacy:"<div class=\"gutter markeddown\"> <p> We don't want you to get a surprise that you've shared something you intended to keep private. You have full control over the visibility of your data, and all defaults favor privacy. </p> <p> You have the ability to make boards and organizations private, in which case only added members will be able to view the board or organization. Actions on private boards and organizations will not show up in profiles. Private organizations and boards are not visible in search. </p> <p> Your member profile is public. That includes your full name, username and bio, not your email. (If you set your full name to be your email, people will see that.) </p> <p> Other users will only see actions on your public boards (unless they are part of one of your private boards or organizations). Boards pages will list only public boards and organizations. </p> <p> Access to your data is tightly controlled internally. Unless we hear different from you, we will only be able to access and view the information you make public. We do run anonymous usage profiling over our database, but no one can inspect your data without your say-so. </p> <h3>Security</h3> <p> All traffic on Trello runs over SSL/HTTPS. This is the same secure protocol used by banks. Data is backed up hourly and copies are stored at an off-site location for disaster recovery. </p> <h3>Portability</h3> <p> Your data is yours. If you ever want to stop using Trello, you should be able to download your data. All Fog Creek products feature data portability where applicable. We strongly believe in it. To export your data, simply open a card or click the board title, then Profile. click the 'Share, Print, and Export' button, and you'll find export options. Currently, we allow export to JSON which is a format that lends itself well to technical usages and cannot be loaded into programs like Microsoft Excel. It is, however, complete, and so does suffice as a backup. </p> <h3>Free... for how long?</h3> <p> Trello is free forever. We may add pay-only features in the future, but everything that's free today will be free tomorrow and forever. Also, we'll not make a for-pay feature that forces you to compromise on privacy, security, or portability. Those are built-in. The maker of Trello, Fog Creek Software, has been profitable for years on the strength of its other products. We can afford to foot the bill. We have no outside investors pushing us to make a quick buck on Trello by selling out our users or getting you hooked before jacking up the price. Trello is free. </p> </div> ",
        org_account:'<form class="account-form" method="POST"> <p class="error" style="display:none"></p> <div class="field"> <label for="displayName">Display Name</label> <input type="text" id="displayName" name="displayName" value="{{displayName}}"> </div> <div class="field"> <label for="name">Orgname</label> <input type="text" id="name" name="name" value="{{name}}" required> <p class="helper"> Your orgname is used in various URLs. Minimum of 3 characters, alphanumeric only. </p> </div> <div class="field"> <label for="website">Website</label> <input id="website" type="text" name="website" value="{{website}}"> </div> <div class="field"> <label for="desc">Description</label> <textarea type="text" name="desc" id="desc">{{desc}}</textarea> </div> <div class="field"> <label for="permissionLevel">Visibility</label> <select name="permissionLevel"> <option value="private"{{#permissionLevel_private}} selected{{/permissionLevel_private}}> Members </option> <option value="public" {{#permissionLevel_public}} selected{{/permissionLevel_public}}> Public </option> </select> </div> <div> <input type="submit" name="save" class="primary js-save-changes" value="Update Organization"> </div> </form> <a class="quiet-button gutter js-confirm-delete-org" href="#" style="margin-top: 32px;">Delete this organization?</a> ',
        board_menu_layout:'<div class="button-link setting" style="width: 256px; max-width: 256px; float: none; margin-bottom: 6px;"> <span class="label">Sidebar Widgets</span> <span class="value"></span> <label>Sidebar Widgets</label> <select name="showSidebar"> <option value="false"{{#showSidebar_false}} selected{{/showSidebar_false}}> Hide All </option> <option value="true"{{#showSidebar_true}} selected{{/showSidebar_true}}> Show Sidebar </option> </select> </div> <div class="button-link setting {{#showSidebar_false}} disabled{{/showSidebar_false}}" style="width: 236px; max-width: 256px; float: none; margin-left: 20px; margin-bottom: 6px;"> <span class="label">Members Widget</span> <span class="value"></span> <label>Members Widget</label> <select name="showSidebarMembers"> <option value="false"{{#showSidebarMembers_false}} selected{{/showSidebarMembers_false}}{{#showSidebar_false}} disabled{{/showSidebar_false}}> Hide </option> <option value="true"{{#showSidebarMembers_true}} selected{{/showSidebarMembers_true}}{{#showSidebar_false}} disabled{{/showSidebar_false}}> Show </option> </select> </div> {{#__ed}} <div class="button-link setting {{#showSidebar_false}} disabled{{/showSidebar_false}}" style="width: 236px; max-width: 256px; float: none; margin-left: 20px; margin-bottom: 6px;"> <span class="label">Board Actions Widget</span> <span class="value"></span> <label>Board Actions Widget</label> <select name="showSidebarBoardActions"> <option value="false"{{#showSidebarBoardActions_false}} selected{{/showSidebarBoardActions_false}}{{#showSidebar_false}} disabled{{/showSidebar_false}}> Hide </option> <option value="true"{{#showSidebarBoardActions_true}} selected{{/showSidebarBoardActions_true}}{{#showSidebar_false}} disabled{{/showSidebar_false}}> Show </option> </select> </div> {{/__ed}} <div class="button-link setting {{#showSidebar_false}} disabled{{/showSidebar_false}}" style="width: 236px; max-width: 256px; float: none; margin-left: 20px; margin-bottom: 6px;"> <span class="label">Activity Widget</span> <span class="value"></span> <label>Activity Widget</label> <select name="showSidebarActivity"> <option value="false"{{#showSidebarActivity_false}} selected{{/showSidebarActivity_false}}{{#showSidebar_false}} disabled{{/showSidebar_false}}> Hide </option> <option value="true"{{#showSidebarActivity_true}} selected{{/showSidebarActivity_true}}{{#showSidebar_false}} disabled{{/showSidebar_false}}> Show </option> </select> </div> <hr> <div class="button-link setting" style="width: 256px; max-width: 256px; float: none; margin-bottom: 6px;"> <span class="label">List Guide</span> <span class="value"></span> <label>List Guide</label> <select name="showListGuide"> <option value="false"{{#showListGuide_false}} selected{{/showListGuide_false}}> Hide List Guide </option> <option value="true"{{#showListGuide_true}} selected{{/showListGuide_true}}> Show List Guide </option> </select> </div> <p class="helper"> The List Guide is a collection of list titles that appears on the left side of the board when the total size of the lists is greater than the board size. It is intended to aid in navigation by visualizing all available lists when some lists on the board are hidden. Board layout preferences are per-user and per-board. </p> ',
        board_archive:'<div class="window-header-utils"> <a class="app-icon close-icon dark-hover js-close-window" href="#" title="Close this dialog window.">Close</a> </div> <div class="window-header clearfix"> <span class="window-header-icon app-icon archive-icon" href="#"></span> <div class="window-title"> <h2 class="window-title-text"> Archived <span class="js-current-section"></span> </h2> <a class="inline-block js-switch-section" href="#">Switch to <span class="js-new-section"></span></a> </div> </div> <div class="window-main-col"> <input class="inline-block js-search js-autofocus" style="margin: 0 0 12px 40px;" type="text" placeholder="Search archived cards"> {{{content}}} </div> ',
        archive_items:'{{^empty}} <div class="window-module clearfix"> {{#section_lists}} <ul class="archive-items bold-list"></ul> {{/section_lists}} {{#section_cards}} <div class="archive-items"></div> {{/section_cards}} </div> {{/empty}} {{#loading}} <div class="spinner loading"></div> {{/loading}} {{#empty}} <p class="empty-list">{{emptyMessage}}</p> {{/empty}} {{#hasMoreCards}} <a class="show-more js-more-archive-cards" href="#">Load More Cards</a> {{/hasMoreCards}} ',
        board_member_profile:'<div class="window-header-utils"> <a class="app-icon close-icon dark-hover js-close-window" href="#">Close</a> </div> <div class="window-header clearfix"> <span class="window-header-icon app-icon member-icon" href="#"></span> <h2 class="window-title"> {{fullName}} {{#username}} <span class="quiet" style="margin-left: 3px">({{username}})</span> {{/username}} </h2> </div> <div class="window-main-col"> <div class="window-main-col-content clearfix"> <div class="list-actions"></div> <a class="show-more js-more-actions" href="#">Load More Activity</a> </div> </div> <div class="window-sidebar"> <div class="profile-member"> {{#avatarHash}} <img class="profile-member-avatar" src="{{__avatarDomain}}/{{avatarHash}}/170.png" alt="{{fullName}}"> {{/avatarHash}} {{^avatarHash}} <p class="profile-member-initials"> {{initials}} </p> {{/avatarHash}} </div> <div class="window-module"> <h3>Actions</h3> <a href="/{{username}}" class="button-link"> <span class="app-icon small-icon member-icon"></span> View Profile </a> {{#canMakeAdmin}} <a class="button-link js-make-admin"> <span class="app-icon small-icon board-icon"></span> Make admin </a> {{/canMakeAdmin}} </div> <div class="window-module"> {{#canRemove}} <a href="#" class="quiet-button js-remove-member"> Remove from Board </a> {{/canRemove}} {{#canRemoveAdmin}} <a href="#" class="quiet-button js-remove-admin"> Give up admin privileges </a> {{/canRemoveAdmin}} </div> </div> ',
        popover_confirm_delete_card:'<p> All actions will be removed from the activity feed and you won\'t be able to re-open the card. There is no undo. You can archive a card to remove it from the board and preserve the activity. </p> <input type="submit" class="js-delete-card primary" value="Yes, delete it."> <input type="submit" class="js-cancel" value="Cancel"> ',
        org_detail:'<div idOrganization="{{id}}"> <div class="window-header clearfix"> <span class="window-header-icon app-icon org-icon"></span> <div class="member-title" attr="displayName"> <h2 class="window-title"> {{displayName}} <span class="quiet" style="margin-left: 3px">({{name}})</span> {{#permissionLevel_public}}<span class="app-icon small-icon public-icon"></span>{{/permissionLevel_public}} {{#permissionLevel_private}}<span class="app-icon small-icon private-icon"></span>{{/permissionLevel_private}} </h2> </div> </div> <div class="window-main-col clearfix"></div> <div class="window-sidebar"> <div class="window-module"> <ul class="sidebar-nav"> <li> <a class="js-org-profile" href="/{{name}}">Profile</a> </li> {{#__ed}} <li> <a class="js-org-account" href="/{{name}}/account">Account</a> </li> {{/__ed}} </ul> </div> </div> </div> ',
        member_search_result_email:'<li class="email-invite {{className}}{{#isInvitable}} invitable{{/isInvitable}}"> <a href="#"> <span class="email">{{email}}</span> {{#extraText}}<span class="quiet">({{extraText}})</span>{{/extraText}} </a> </li> ',
        manual_base:'<div class="manual {{#about}}about{{/about}} {{#guide}}guide{{/guide}} {{#shortcuts}}shortcuts{{/shortcuts}} {{#requirements}}requirements{{/requirements}}"> {{#is_board}} <div class="window-header-utils"> <a class="app-icon close-icon dark-hover js-close-window" href="#">Close</a> </div> {{/is_board}} <div class="window-header clearfix"> <span class="window-header-icon app-icon manual-icon"></span> <h2 class="window-title"> {{title}} </h2> </div> <div class="window-main-col clearfix"> {{{manual_content}}} </div> <div class="window-sidebar"> <div class="sidebar-nav mini window-module"> <h3>Trello</h3> <ul> <li> <a class="js-info-about {{#about}}active{{/about}}" href="/about">About</a> </li> <li> <a class="js-info-guide {{#guide}}active{{/guide}}" href="/guide">Guide</a> </li> <li> <a class="js-info-help {{#help}}active{{/help}}" href="/help">Help!</a> </li> <li> <a class="js-info-shortcuts {{#shortcuts}}active{{/shortcuts}}" href="/shortcuts">Shortcuts</a> </li> <li> <a class="js-info-trello-dev" href="https://trello.com/board/4d5ea62fd76aa1136000000c">Trello Development</a> </li> <li> <a class="js-info-api js-real-link" href="/docs/">API</a> </li> <li> <a class="js-info-privacy {{#privacy}}active{{/privacy}}" href="/privacy">Privacy, Security, Data</a> </li> <li> <a target="_blank" class="js-info-tos js-real-link" href="/legal">Terms of Service</a> </li> </ul> </div> <div class="elsewhere-links window-module clearfix" style="margin-left: 8px;"> <h3>Elsewhere</h3> <a target="_blank" class="elsewhere-icon blog js-real-link js-info-blog" href="http://blog.trello.com" title="Trello Blog"> <span class="social-icon blog-icon"></span> </a> <a target="_blank" class="elsewhere-icon twitter js-real-link js-info-twitter" href="https://www.twitter.com/trello" title="@trello on Twitter"> <span class="social-icon twitter-icon"></span> </a> <a target="_blank" class="elsewhere-icon facebook js-real-link js-info-facebook" href="https://www.facebook.com/TrelloApp" title="Trello on Facebook"> <span class="social-icon facebook-icon"></span> </a> </div> <div class="window-module" style="margin: 24px 0 0 8px;"> <h3>Made by</h3> <a style="display: block;" class="js-real-link js-info-fogcreek" href="http://www.fogcreek.com/?fccmp=trello_about" target="_blank"> <img src="https://d2k1ftgv7pobq7.cloudfront.net/images/17a0f12ca7961ef879477c2f9c40ed02/fog_creek_logo.png" style="max-width: 150px;"> </a> </div> </div> </div> ',
        board:' <div id="board-header" class="clearfix"> <a class="app-icon dark-hover board-icon js-open-board-menu-icon"></a> <div class="board-title"> <h2><a href="#" class="js-board-title js-open-board-menu-title">{{name}}</a></h2> <h4 class="quiet org-name"></h4> <div id="permission-level"></div> <div class="desc-btn js-open-desc"><span class="app-icon small-icon edit-icon dark-hover"></span></div> </div> </div> <div class="board-widgets{{#showSidebar_false}} disabled{{/showSidebar_false}}"> <div class="master-board-widget-menu"> <span class="app-icon small-icon dark-hover menu-icon js-show-all-widgets" name="showSidebar"></span> </div> {{#__invited}} <div class="board-widget clearfix{{#showSidebarMembers_false}} disabled{{/showSidebarMembers_false}}"> {{#__loggedIn}} <div class="clearfix"> <a class="button primary left js-accept-invite" style="margin-top: 0; padding: 6px 10px;" href="">Accept Invite</a> <a class="button left js-reject-invite" style="margin-top: 0; padding: 6px 10px;" href="">Reject</a> </div> {{/__loggedIn}} {{^__loggedIn}} <div class="clearfix"> <a class="button primary left js-signup-and-join" style="margin-top: 0; padding: 6px 10px;" href="#">Accept the invite and sign up!</a> </div> {{/__loggedIn}} <p class="helper clear" style="margin-top: 8px;"> {{#permissionLevel_private}} This is a private board. You can see it because you\'ve been invited. {{/permissionLevel_private}} {{#permissionLevel_org}} This board is private to an organization. You can see it because you\'ve been invited. {{/permissionLevel_org}} {{#permissionLevel_public}} This board is publicly viewable. {{/permissionLevel_public}} Accept the invite to make changes. </p> </div> {{/__invited}} {{#canJoin}} <div class="board-widget clearfix{{#showSidebarMembers_false}} disabled{{/showSidebarMembers_false}}"> <a href="#" class="button js-join-board" style="margin: 0"> Join Board </a> <p class="helper" style="margin-top: 8px;">Org members can join this board.</p> </div> {{/canJoin}} <div class="board-widget clearfix{{#showSidebarMembers_false}} disabled{{/showSidebarMembers_false}}"> <div class="board-widget-title"> <h3>Members</h3> <span class="app-icon small-icon dark-hover menu-icon board-widget-menu-btn js-board-widget-vis" name="showSidebarMembers"></span> </div> <div class="board-widget-content"> <div class="board-widget-members js-list-board-members {{#__ed}} assignable-members {{/__ed}} clearfix"></div> {{#canInviteMembers}} <a href="#" class="button-link js-open-manage-board-members"> <span class="app-icon small-icon member-icon"></span> Add Members&hellip; </a> {{/canInviteMembers}} </div> </div> <div class="board-widget clearfix{{#showSidebarBoardActions_false}} disabled{{/showSidebarBoardActions_false}}"> <div class="board-widget-title"> <h3>Board</h3> <span class="app-icon small-icon dark-hover menu-icon board-widget-menu-btn js-board-widget-vis" name="showSidebarBoardActions"></span> </div> <div class="board-widget-content"> <a class="button-link js-open-board-menu-sidebar" href="#"> <span class="app-icon small-icon board-icon"></span> Options <span class="app-icon small-icon menu-icon" style="position: absolute; top: 6px; right: 6px;"></span> </a> {{#__ed}} <a class="button-link js-add-list-popover"> <span class="app-icon small-icon list-icon"></span> Add List </a> {{/__ed}} <a class="button-link js-filter-cards"> <span class="app-icon small-icon card-icon"></span> Search and Filter Cards <span class="on">ON</span> </a> </div> </div> <div class="board-widget board-widget-actions bottom clearfix{{#showSidebarActivity_false}} disabled{{/showSidebarActivity_false}}"> <div class="board-widget-title"> <h3 class="inline-block">Activity</h3> <a style="margin-left: 3px;" class="quiet js-view-all-activity-header" href="#"> View all&hellip; </a> <span class="app-icon small-icon dark-hover menu-icon board-widget-menu-btn js-board-widget-vis" name="showSidebarActivity"></span> </div> <div class="board-widget-content"> <div class="activity-gradient-t"></div> <div class="activity-gradient-b"></div> <div class="board-actions-list fancy-scrollbar"> <div class="js-sidebar-list-actions"></div> <a class="show-more js-view-all-activity-list" href="#"> View all&hellip; </a> {{#__ed}} <a href="#" style="padding: 0 0 0 40px; font-weight: bold;" class="js-allow-notifications quiet"> Allow Notifications </a> {{/__ed}} </div> </div> </div> </div> <div class="list-guide{{#showListGuide_false}} disabled{{/showListGuide_false}}"> <div class="list-guide-wrapper fancy-scrollbar"></div> </div> <div id="board" class="clearfix{{^__ed}} permission-public{{/__ed}}{{#showSidebar_false}} disabled-board-widgets{{/showSidebar_false}}{{#showListGuide_false}} disabled-list-guide{{/showListGuide_false}}"> <div class="list-area-wrapper fancy-scrollbar"> <div class="list-area {{#__ed}} js-list-sortable {{/__ed}} no-edits clearfix"> </div> </div> </div> ',
        org_profile:'{{#__ed}}{{^desc}} <div class="window-module gutter"> <a href="/{{name}}/account">No description specified (click to edit)</a> </div> {{/desc}}{{/__ed}} {{#desc}} <div class="window-module gutter"> {{{descriptionHtml}}} </div> {{/desc}} {{#websiteHref}} <div class="window-module gutter"> <p> <a href="{{websiteHref}}">{{website}}</a> </p> </div> {{/websiteHref}} {{#__invited}} <div class="window-module gutter clearfix"> {{#__loggedIn}} <a class="button primary left js-accept-invite" href="">Accept Invite</a> <a class="button left js-reject-invite" href="">Reject</a> {{/__loggedIn}} {{^__loggedIn}} <a class="button primary left js-signup-and-join" href="#">Accept the invite and sign up!</a> {{/__loggedIn}} </div> {{/__invited}} <div class="window-module"> <div class="window-module-title"> <span class="app-icon member-icon window-module-title-icon"></span> <h3 class="inline-block">Members</h3> </div> <div class="list-org-members gutter clearfix"></div> {{#__ed}} <a class="button-link gutter js-manage-members" href="#"> <span class="app-icon small-icon member-icon"></span> Add Members </a> {{/__ed}} </div> <div class="window-module"> <div class="window-module-title"> <span class="app-icon board-icon window-module-title-icon"></span> <h3>Boards</h3> </div> {{#empty}}<p class="empty-list">No boards</p>{{/empty}} <div class="js-boards-list"></div> </div> ',
        org_create:'{{#is_board}} <div class="window-header-utils"> <a class="app-icon close-icon dark-hover js-close-window" href="#">Close</a> </div> {{/is_board}} <div class="window-header clearfix"> <span class="window-header-icon app-icon org-icon"></span> <h2 class="window-title"> Create an Organization </h2> </div> <div class="window-main-col"> <form class="account-form" method="POST"> <p class="error" style="display:none"></p> <div class="field"> <label for="displayName">Display Name</label> <input type="text" name="displayName" value="{{displayName}}"> </div> <div class="field"> <label for="website">Website</label> <input type="text" name="website" value="{{website}}"> </div> <div class="field"> <label for="desc">Description</label> <textarea type="text" name="desc" value="{{desc}}"></textarea> </div> <div class="field"> <label for="permissionLevel">Visibility</label> <select name="permissionLevel"> <option value="private" selected> Members </option> <option value="public"> Public </option> </select> </div> <div> <input type="submit" name="save" class="primary js-create-org" value="Create Organization"> </div> </form> </div> ',
        popover_share:'<form> <label> Link to this {{object}} <span class="app-icon small-icon {{#public}}public{{/public}}{{#org}}org-private{{/org}}{{#private}}private{{/private}}-icon"></span> </label> <input type="text" class="js-url js-autofocus" readonly="readonly"/> {{#org}} <p class="quiet"> This {{object}} is only visible to members of <em>{{orgName}}</em>. Outside users won\'t be able to view it. </p> {{/org}} {{#private}} <p class="quiet"> This {{object}} is only visible to its members. Outside users won\'t be able to view it. </p> {{/private}} <hr> <label style="margin: 8px 0 4px 0;"> Print {{object}} </label> <input style="margin: 0 4px 4px 0;" class="js-print" type="button" value="Print"> <hr> <label style="margin: 8px 0 4px 0;"> Export data </label> <a style="margin: 0 4px 4px 0;" class="button js-export-json js-real-link" href="{{jsonURL}}" target="_blank">JSON</a> </form> ',
        manual_guide:'<div class="markeddown guide"> <div class="term"> <span class="term-icon app-icon attachment-icon"></span> <h3>Attachments</h3> <p> Card attachments are files uploaded to cards. Attachments appear in the "Attachments" section of the card detail. </p> <dl> <dt> <p> <strong>Adding</strong> </p> </dt> <dd> <p> Click the "Upload" button in the Attachments section of the card detail to upload. On newer versions of Chrome and Safari, you can simply drag the file from your desktop to the upload button. </p> </dd> <dt> <p> <strong>Deleting</strong> </p> </dt> <dd> <p> Delete attachments by clicking "delete" beneath the attachment in the card detail sidebar. </p> </dd> <dt> <p> <strong>Limitations</strong> </p> </dt> <dd> <p> There is a 10mb file upload limit per attachment. It\'s not possible to upload attachments via the mobile site. </p> <p> There is no limit on the number of attachments you can have on a card or board. Neither is there an account data storage limit. </p> </dd> </dl> </div> <div class="term"> <span class="term-icon app-icon board-icon"></span> <h3>Boards</h3> <p> A board is a product, project, resource, or organizational structure that is under continuous development, though a board can represent anything and have a variety of uses. Boards have a collections of lists, and lists contain cards. </p> <dl> <dt> <p> <strong> Adding </strong> </p> </dt> <dd> <p> Create a new board by clicking the "Boards" menu in the header and selecting "New Board" or by clicking "Add Board" in your boards page or an organization\'s profile page. </p> <p> To add members to a board, select "Add Members..." from the board sidebar. Search for a user by name or enter an email address to invite them to the board, click their name and click "Invite". They people must accept the invite before being able to interact with the board (move, edit, add cards, etc.). </p> </dd> <dt> <p> <strong> Editing </strong> </p> </dt> <dd> <p> Edit a board title by clicking the \'Board Menu\' button or the board title, and selecting \'Settings\', and selecting \'Rename Board\'. You can also click the edit button (<span class="app-icon small-icon edit-icon"></span>) next to the board title. It will bring up the board description dialog where you can change the title or description by clicking on them. Only board admins are able to edit the board title. </p> </dd> <dt> <p> <strong>Closing / Removing</strong> </p> </dt> <dd> <p> Close a board by selecting "Close Board" from the board menu (the <span class="app-icon small-icon board-icon"></span> icon by the board title). </p> <p> To remove a member from a board, click the avatar in the members section in the sidebar, and select "Remove from Board". You must be an admin to remove a member from a board. </p> </dd> <dt> <p> <strong>Reopening</strong> </p> </dt> <dd> <p> Re-open a board by clicking the "Boards" menu in the header and selecting "View Closed Boards". Find the board and click "Re-open". You need to have been a board admin to reopen a board. </p> </dd> <dt> <p> <strong>Preferences / Permissions</strong> </p> </dt> <dd> <p> Set the visibility and permissions of features by clicking \'Board Menu\' in the sidebar or clicking the board title, then clicking \'Settings\'. As a board admin, you\'ll see options for \'Rename Board\', \'Change Organization\', \'Permissions\', \'Board Description\', and \'Layout Options\'. Permissions and options will vary per user. </p> <p> You can set the visibility of boards to public, an organization, or private through the \'Permissions\' menu. Setting a board to public allows all members of Trello to view your board and optionally vote or comment. You can turn other features (like comments and voting) on and off for public members via the \'Permissions\' menu. </p> <p> Board admins have a different set of permissions on a board. Only admin can remove users and change the board title, for instance. To make a board member an admin, click their avatar in the member\'s sidebar, select "Change role...", then select "Admin". </p> </dd> <dt> <p> <strong>Bonus</strong> </p> </dt> <dd> <p> Trello tells you who is online right now via a status icon on a member\'s avatar. The green indicates "online now", the yellow indicates "idle" (haven\'t touched the mouse on their Trello tab in over five minutes), and gray for "offline". The blue icon means a member is an admin of the board. Admins have special privileges like the ability to remove members from a board. </p> </dd> </dl> </div> <div class="term"> <span class="term-icon app-icon card-icon"></span> <h3>Cards</h3> <p> Cards are the basic unit of a board. They might represent new software features, story leads, legal cases, things to buy at the store, freelance clients, potential employees, or customer support issues. Drag cards from list to list to indicate progression, status, or what-have-you. You can add people to cards, label them, vote, attach files, start conversations, create task checklists, and so on. </p> <dl> <dt> <p> <strong>Adding</strong> </p> </dt> <dd> <p> Add cards via the "Add Card" input at the bottom of lists. </p> </dd> <dt> <p> <strong>Editing</strong> </p> </dt> <dd> <p> Edit a card title by clicking the title on the card detail view. A card has an optional description field. You can edit the description on card detail. <a href="http://daringfireball.net/projects/markdown/syntax" target="_blank">Markdown</a> is used for formatting. </p> </dd> <dt> <p> <strong>Subscribing</strong> </p> </dt> <dd> <p> Click the "Subscribe" button to get notified when another user makes changes to the card. </p> </dd> <dt> <p> <strong>Archiving / Deleting</strong> </p> </dt> <dd> <p> Archive cards by clicking "Archive Card" in the Actions menu in card detail (enter the card detail by clicking on the card). You can also select "Archive" from the card menu (the menu that appears on hover). You can also archive with the "c" keyboard shortcut. </p> <p> You can delete a card from the back of the card. There is a \'Delete this card\' link at the bottom of the sidebar. You can also delete from the archive. Click "View Archived Items", find the card and select "Delete". There is no way to get a deleted card back. It will not show up in any search results and actions associated with it will by removed from the activity stream. </p> </dd> <dt> <p> <strong>Unarchiving</strong> </p> </dt> <dd> <p> Click "View Archived Items" from the board sidebar, find the card and click "Send to Board". </p> </dd> <dt> <p> <strong>Shortcuts / Quick Menus</strong> </p> </dt> <dd> <p> Select a card and click the menu icon (<span class="app-icon small-icon menu-icon"></span>) that appears. The card menu allows you to perform actions on a card without from the board view. </p> <p> There are keyboard shortcuts for assigning members (a), archiving (c), labels (l), due dates (d), moving cards (&lt; and &gt;), and voting (v). A complete list can be seen on the <a href="/shortcuts">shortcuts page</a>. </p> </dd> </dl> </div> <div class="term"> <span class="term-icon app-icon card-icon"></span> <h3>Card Filters</h3> <p> Card filters allow you to focus on specific labels, members, and keywords. Filters are applied per member then by selected labels. For example, if you select "Bobby" and "Daniel" and the "Red" and "Yellow" labels, the filter highlights cards assigned to either Daniel or Bobby (or both) that have at least one of the red or yellow labels. If you select one or more labels, but no members, the filter highlights cards with any of the selected labels, i.e. all red-labeled, yellow-labeled, or red-and-yellow-labeled cards. If you select one or more members, but no labels, the filter highlights cards with any of the selected members, i.e. all cards assigned to "Daniel", "Bobby", or both. </p> <p> You can also search by title using comma-separated terms. Items are filtered using the subset of cards with matching terms, then filtered as above. </p> <p> There is a "Display Type" that allows for "Hidden" or "Translucent" mode. </p> <dl> <dt> <p> <strong>Applying</strong> </p> </dt> <dd> <p> Apply filters using the "Filter Cards..." button on the board sidebar, then selecting a combination of labels and members. </p> </dd> <dt> <p> <strong>Removing</strong> </p> </dt> <dd> <p> Clear all filters using the the "clear all" button in the pop-over menu or by using the "x" keyboard shortcut. </p> </dd> <dt> <p> <strong>Shortcuts</strong> </p> </dt> <dd> <p> To open the card filter menu, use the "f" keyboard shortcut. To filter only your cards, using the "q" keyboard shortcut. To remove all filters, use the "x" keyboard shortcut. </p> </dd> </dl> </div> <div class="term"> <span class="term-icon app-icon checklist-icon"></span> <h3>Checklists</h3> <p> A checklist is a way of keeping track of subtasks within a card. You can add multiple checklists to a single card. </p> <dl> <dt> <p> <strong>Adding</strong> </p> </dt> <dd> <p> Add Checklists via the "Add Checklist" button in the "Actions" section of the card detail. Enter a title (or use the default "Checklist"), then click \'Add\'. Add new checklist items via the "Add checklist item" input in a checklist. </p> </dd> <dt> <p> <strong>Editing</strong> </p> </dt> <dd> <p> Mark an item as complete or incomplete by clicking the checkbox to the left of the title. Rename a checklist or checklist item by clicking the title, changing the text, and clicking save. You can reorder a checklist item by dragging. </p> </dd> <dt> <p> <strong>Deleting</strong> </p> </dt> <dd> <p> Delete a checklist or checklist item by clicking the menu button that appears when hovering, and selecting delete. </p> </dd> <dt> <p> <strong>Bonus</strong> </p> </dt> <dd> <p> You can also turn a checklist item into a card by clicking the item and selecting "Convert to Card". It removes the item and creates a card with the title of the item beneath the current card. </p> </dd> </dl> </div> <div class="term"> <span class="term-icon app-icon comment-icon"></span> <h3>Comments</h3> <dl> <dt> <p> <strong>Adding</strong> </p> </dt> <dd> <p> You can add comments to a card via the "Add Comment" textbox in the "Activity" section of the card detail. </p> </dd> <dt> <p> <strong>Deleting</strong> </p> </dt> <dd> <p> Delete comments by clicking the "delete" link beneath the comment. You can delete any comment you make on any board. Board admins can delete public comments made on their boards. Deleting is permanent. </p> </dd> <dt> <p> <strong>Preferences / Permissions</strong> </p> </dt> <dd> <p> You can disable comments via the board preferences page in the board menu (the <span class="app-icon small-icon board-icon"></span> icon by the board title). On public boards, you can enable or disable public comments via the board preferences page. </p> </dd> <dt> <p> <strong>Bonus</strong> </p> </dt> <dd> <p> You can mention people in comments by using "@" followed by the user\'s name. The mentioned user will get a notification. </p> </dd> </dl> </div> <div class="term"> <span class="term-icon app-icon date-icon"></span> <h3>Due Dates</h3> <p> You can set a date and time for when a card is "due". A badge with the due date will appear on cards. A yellow badge means it\'s within 24 hours of being due A red badge means it\'s past due. </p> <dl> <dt> <p> <strong>Adding</strong> </p> </dt> <dd> <p> You can add a due date via the card detail under "Action" in the sidebar. You can also add dates via the card menu and with the "d" shortcut. </p> </dd> <dt> <p> <strong>Editing</strong> </p> </dt> <dd> <p> You can edit a due date by clicking the due date in the card detail and selecting a new date or time. </p> </dd> <dt> <p> <strong>Removing</strong> </p> </dt> <dd> <p> Remove a due date by clicking the due date in the card detail and selecting "Remove" from the lower right corner. </p> </dd> <dt> <p> <strong>Shortcuts</strong> </p> </dt> <dd> <p> You can use "d" to open the date picker and add, edit, or remove a date and time via the board view. </p> </dd> <dt> <p> <strong>Bonus</strong> </p> </dt> <dd> <p> You can add or change a due date for a card by entering "due mm/dd/[yy]yy" as a comment. </p> </dd> </dl> </div> <div class="term"> <span class="term-icon app-icon label-icon"></span> <h3>Labels</h3> <p> A label is a way of categorizing a card by type, represented by a color. A single card can have multiple labels. </p> <dl> <dt> <p> <strong>Adding</strong> </p> </dt> <dd> <p> Add labels via the card detail "Labels&hellip;" button. Active labels are represented with a checkmark on the right. </p> </dd> <dt> <p> <strong>Editing</strong> </p> </dt> <dd> <p> Labels names can be edited by opening the board menu (in the sidebar or clicking the board title) and selecting "Labels". </p> </dd> <dt> <p> <strong>Removing</strong> </p> </dt> <dd> <p> Remove a label from a card via the card detail "Labels&hellip;" button. Active labels are represented with a white label icon to the right. </p> </dd> <dt> <p> <strong>Shortcuts</strong> </p> </dt> <dd> <p> You can also add and remove labels pressing "l" to bring up a pop-over menu of labels. Toggle an individual label by pressing numbers between 1 and 6. Individual label shortcuts are mapped below. </p> <table> <thead> <tr> <th>Key</th> <th>Label Color</th> </tr> </thead> <tbody> <tr> <td>1</td> <td>Green</td> </tr> <tr> <td>2</td> <td>Yellow</td> </tr> <tr> <td>3</td> <td>Orange</td> </tr> <tr> <td>4</td> <td>Red</td> </tr> <tr> <td>5</td> <td>Purple</td> </tr> <tr> <td>6</td> <td>Blue</td> </tr> </tbody> </table> </dd> </dl> </div> <div class="term"> <span class="term-icon app-icon list-icon"></span> <h3>Lists</h3> <p> A list is collection of vertically-arranged cards. They may represent different stages of a workflow. </p> <dl> <dt> <p> <strong>Adding</strong> </p> </dt> <dd> <p> Add a list to a board by clicking the "Add List" button in the board sidebar. You can also add a list by selecting "Add List" from the board menu (clicking the board title or the "Board Menu" button in the sidebar). </p> </dd> <dt> <p> <strong>Editing</strong> </p> </dt> <dd> <p> You can also move lists by dragging them left and right. Change a list name by clicking the name. </p> </dd> <dt> <p> <strong>Archiving</strong> </p> </dt> <dd> <p> Archive a list by selecting the "Archive this List" from the list menu that appears to the right of title on hover. (It\'s not currently possible to permanently delete a list.) </p> </dd> <dt> <p> <strong>Unarchiving</strong> </p> </dt> <dd> <p> Reopen a list by selecting "View Archived Items" from the board sidebar, clicking "List" in the sidebar, choosing a list and clicking "Send to Board". </p> </dd> </dl> </div> <div class="term"> <span class="term-icon app-icon notification-icon"></span> <h3>Notifications</h3> <p> You get a notification when you are added to a card, you were invited to a board or organization, you were mentioned in a comment, or when somebody does an action on a card you are on. Notifications are represented on the Trello site with a red icon and number in the top right corner. </p> <p> You are emailed a collection of unread notifications. Email summaries won\'t include any notifications you\'ve already read on the site. </p> <p> You can also subscribe to any visible card. When subscribed, you\'ll get notifcations about that card. To subscribe, open the card and click the subscribe button in the sidebar. </p> <dl> <dt> <p> <strong>Preferences</strong> </p> </dt> <dd> <p> You can change how often you get emails in your <a href="/me/account">"Account"</a> page. Options are "Never", "Periodically", and "Instantly". "Periodically" is the default and checks for unread notifications and sends them about every hour. "Instantly" checks as soon as possible. </p> </dd> </dl> </div> <div class="term"> <span class="term-icon app-icon org-icon"></span> <h3>Organizations</h3> <p> An organization is a way of grouping people and boards. You can make an organization board visible only to organization members, and allow for organization members to use certain features such as comments and voting for only organization members. </p> <dl> <dt> <p> <strong>Adding</strong> </p> </dt> <dd> <p> You can create a new organization through your Boards page, with the "Create an Organization" link at the bottom. </p> <p> To add members to an organization, first go to the organization profile. You can get to the organization profile from the link in your board page or the link next to the title of a board. Then click "Members" in the sidebar. In the input field, enter an email address to invite or search for a current member. NOTE: You must be an admin of an organization to add members. </p> </dd> <dt> <p> <strong>Removing</strong> </p> </dt> <dd> <p> To remove a member from an organization, click their avatar on the organization profile and select "Remove from Organization". You must be an admin to remove organization members. </p> </dd> <dt> <p> <strong>Permissions</strong> </p> </dt> <dd> <p> Organization admins can make the organizations visibility public or private. You can change the setting in the "Account" page. Private organizations will not show up on your profile when other people view it. They will also not show up in search results. </p> <p> Organizations also have admins which have the ability to add / remove members, and edit the name and description. To add a member as an admin, click on their avatar in the member list on the profile, and select "Make Admin of Organization". </p> </dd> </dl> </div> <div class="term"> <span class="term-icon app-icon vote-icon"></span> <h3>Voting</h3> <p> Trello allows up voting on cards. To view a list of voters, click the number beneath the vote button on card detail. </p> <dl> <dt> <p> <strong>Adding / Removing a Vote</strong> </p> </dt> <dd> <p> People can vote on cards by clicking the "Vote" button on card detail. The button will appear green if you have voted for the card. Clicking again will remove your vote. Hovering over a card and clicking "v" will also add or remove a vote. </p> </dd> <dt> <p> <strong>Permissions</strong> </p> </dt> <dd> <p> You can control who can vote (nobody, board members, members of the board\'s organization, or the public) via the board preferences page in the board menu (the <span class="app-icon small-icon board-icon"></span> icon by the board title). </p> </dd> </dl> </div> </div> ',
        user_header:'{{#__loggedIn}} <a class="header-btn hide upgrade" href="#", onclick="window.location.reload();"><span class="app-icon small-icon light reopen-icon"></span><span class="header-btn-text">Update Available</span></a> <a class="header-btn header-notifications js-open-header-notifications-menu" title="View your notifications" href="#"> <span class="app-icon light notification-icon"></span> <span class="header-btn-text">Notifications</span> <span class="count js-unread-note-count"></span> </a> <a class="header-btn header-boards js-open-header-boards-menu" title="View list of boards" href="#"> <span class="app-icon light board-icon"></span> <span class="header-btn-text">Boards</span> </a> <a class="header-auth member js-open-header-member-menu" href="#"></a> {{/__loggedIn}} {{^__loggedIn}} <a class="header-btn header-login js-toggle-login-popover" href="#">Log In</a> <a class="header-btn header-signup" href="/signup">Sign Up</a> {{/__loggedIn}} ',
        filter_cards:'<ul class="card-filter"> <li> <input type="text" class="js-filter-by-title js-autofocus" attr="title" placeholder="Search with space-separated terms" value="{{searchTerms}}"> </li> {{#labelNames}} <li> <a href="#" class="js-filter-toggle filter-label-toggle clearfix {{#activeGreen}}active{{/activeGreen}}" attr="green"> <span class="card-label green-label"></span> <span class="title"> {{#green}} {{green}} {{/green}} {{^green}} <span class="quiet">Green label (default)</span> {{/green}} </span> <span class="app-icon small-icon light close-icon"></span> </a> </li> <li> <a href="#" class="js-filter-toggle filter-label-toggle clearfix {{#activeYellow}}active{{/activeYellow}}" attr="yellow"> <span class="card-label yellow-label"></span> <span class="title"> {{#yellow}} {{yellow}} {{/yellow}} {{^yellow}} <span class="quiet">Yellow label (default)</span> {{/yellow}} </span> <span class="app-icon small-icon light close-icon"></span> </a> </li> <li> <a href="#" class="js-filter-toggle filter-label-toggle clearfix {{#activeOrange}}active{{/activeOrange}}" attr="orange"> <span class="card-label orange-label"></span> <span class="title"> {{#orange}} {{orange}} {{/orange}} {{^orange}} <span class="quiet">Orange label (default)</span> {{/orange}} </span> <span class="app-icon small-icon light close-icon"></span> </a> </li> <li> <a href="#" class="js-filter-toggle filter-label-toggle clearfix {{#activeRed}}active{{/activeRed}}" attr="red"> <span class="card-label red-label"></span> <span class="title"> {{#red}} {{red}} {{/red}} {{^red}} <span class="quiet">Red label (default)</span> {{/red}} </span> <span class="app-icon small-icon light close-icon"></span> </a> </li> <li> <a href="#" class="js-filter-toggle filter-label-toggle clearfix {{#activePurple}}active{{/activePurple}}" attr="purple"> <span class="card-label purple-label"></span> <span class="title"> {{#purple}} {{purple}} {{/purple}} {{^purple}} <span class="quiet">Purple label (default)</span> {{/purple}} </span> <span class="app-icon small-icon light close-icon"></span> </a> </li> <li> <a href="#" class="js-filter-toggle filter-label-toggle clearfix {{#activeBlue}}active{{/activeBlue}}" attr="blue"> <span class="card-label blue-label"></span> <span class="title"> {{#blue}} {{blue}} {{/blue}} {{^blue}} <span class="quiet">Blue label (default)</span> {{/blue}} </span> <span class="app-icon small-icon light close-icon"></span> </a> </li> {{/labelNames}} {{#boardMems}} <li> <a href="#" class="js-filter-toggle filter-member-toggle clearfix {{#activeFilter}}active{{/activeFilter}}" attr="{{username}}"> <div class="member"> {{>member}} </div> <p class="title"> {{fullName}} <span class="quiet">({{username}})</span> <span class="app-icon small-icon light close-icon"></span> </p> </a> </li> {{/boardMems}} <li class="card-filter-title" style="margin-top: 8px;"> <p style="margin-bottom: 4px;"> <strong>Display Type</strong> </p> </li> <li class="display-options clearfix"> <ul> <li> <a href="#" class="js-use-hidden {{#hiddenfilter}} active{{/hiddenfilter}}">Hidden</a> </li> <li> <a href="#" class="js-use-translucent last{{#translucentfilter}} active{{/translucentfilter}}">Translucent</a> </li> </ul> </li> <li style="margin-top: 8px;"> <a href="#" class="js-filter-toggle js-clear-all clearfix"> <span class="title quiet">Clear All</span> </a> </li> </ul> ',
        card_in_list:'<div class="card-labels clearfix">{{#labels}}{{#isActive}} <div class="card-label {{color}}-label"> </div> {{/isActive}}{{/labels}}</div> {{#__ed}}<span class="card-operation app-icon dark-hover small-icon menu-icon js-card-menu"></span>{{/__ed}} <a href="{{url}}" class="list-card-title clear"><span class="card-short-id hide">#{{idShort}} </span>{{name}}</a> <div class="badges"></div> <div class="list-card-members"></div> ',
        landing:'<script type="text/javascript"> if(!window.unsupported && $){ $.getScript(\'https://use.typekit.com/abf0ews.js\', function(){ try{Typekit.load();}catch(e){}; }); } <\/script> <div class="markeddown landing-section landing-header"> <div class="landing-section-wrapper pitch-section clearfix"> <div class="landing-block pitch-block clearfix"> <img title="Trello logo" src="https://d2k1ftgv7pobq7.cloudfront.net/images/landing/05a76001c51b56f750b03de332e6c5c0/logo-tag.png"> <h1>Trello</h1> <h2>Organize anything, together.</h2> <p class="pitch"> Trello is a collaboration tool that organizes your projects into boards. In one glance, Trello tells you what\'s being worked on, who\'s working on what, and where something is in a process. </p> <a class="button primary" href="/signup"> {{#AB_create_a_free_account}} Create a Free Account {{/AB_create_a_free_account}} {{^AB_create_a_free_account}} Create an Account {{/AB_create_a_free_account}} </a> <p> Creating an account is free and easy. </p> </div> <div class="landing-block video-block clearfix"> <div class="video-block-wrapper"> <iframe width="100%" height="100%" src="https://www.youtube.com/embed/aaDf1RqeLfo?rel=0&hd=1&wmode=transparent&modestbranding=1&autohide=1&showinfo=0&fs=1" frameborder="0" allowfullscreen wmode="Opaque"></iframe> </div> </div> </div> </div> <div class="markeddown landing-section"> <div class="landing-section-wrapper clearfix"> <div class="landing-headline"> <h2>The Good Stuff</h2> <p> What will Trello do for you? </p> </div> <div class="landing-block"> <h3>Overview</h3> <p> All your projects, all your tasks, all of your team--organized, accounted for, and easily visible at a glance. New users instantly understand the list and card metaphor, and can be working on Trello within minutes. </p> </div> <div class="landing-block"> <img alt="Board example" src="https://d2k1ftgv7pobq7.cloudfront.net/images/landing/a91fb43f4a4f191fbb116bd729c1a040/board.png"> </div> <div class="landing-block"> <h3>Boards</h3> <p> A board is a just a collection of lists (and lists hold the cards). You\u2019ll probably want a board for each project you\u2019re working on. You can add and start using a new board in seconds. You can glance at a board and get a handle on the status of any project. </p> </div> <div class="landing-block"> <h3>Lists</h3> <p> Lists can be just simple lists, but they are most powerful when they represent a stage in a process. Simply drag your lists into place to represent your workflow. Move a card from one list to the next to show your progress. </p> </div> <div class="landing-block"> <h3>Cards</h3> <p> Cards are tasks. You make a card to track something you or your team needs to get done. You can add attachments, embed video, assign users, add due dates, make checklists, or you can just add your card to a board with no fuss and no overhead, and know exactly what work needs to get done. </p> </div> <div class="landing-block"> <img alt="Card example" src="https://d2k1ftgv7pobq7.cloudfront.net/images/landing/46834978dc1086d1b3683a2fa26728c0/card.png"> </div> <div class="landing-block"> <h3>Real Time Updates</h3> <p> Trello instantly updates. No refreshing is ever required, and everyone on the team sees all updates and actions immediately. Try it! </p> </div> <div class="landing-block"> <h3>Members and Organizations</h3> <p> You have control over board permissions. You can make a board that your company and team can see, or you can restrict it to specific people. You can invite your whole company with one invite, or you can supply a list of emails. Either way, adding lots of people to your or your organization\u2019s boards is simple. </p> </div> <div class="landing-block"> <h3>Works on just about any device.</h3> <p> Trello works on smartphones, tablets, laptops... just about anything. Just point your browser to trello.com and you\'re using it on the go. There\'s nothing to install or update. </p> </div> <div class="landing-block"> <h3>Notifications</h3> <p> You won\u2019t miss a thing. Trello lets you know when you receive lavish praise in the comments, when someone does something to a card you\u2019re assigned to, or sends you a board invite. With the updates column you can see exactly what\u2019s happening on the board as it is happening. </p> </div> <div class="landing-block"> <h3>Public Boards</h3> <p> Make a public board and let your customers see your roadmap or your current priorities. Allow public commenting and voting, making it perfect for new feature requests, or to decide amongst your friends where to take your next vacation. </p> </div> <div class="landing-block"> <h3>Solid Security</h3> <p> Everything in Trello is secure. All traffic runs over SSL which encrypts all of your traffic. Trello is backed up hourly, so you\u2019re in no danger of losing important lists or tasks. </p> </div> <div class="landing-block"> <h3>Embed it all!</h3> <p> Upload attachments, embed video, add images, Twitter previews, and so on. </p> </div> <div class="landing-block"> <h3>Hey, pay attention!</h3> <p> If you need to get someone else\u2019s attention, just address them like \u201c@bob\u201d and they will get a notification. </p> </div> </div> </div> <div class="markeddown landing-section"> <div class="landing-section-wrapper clearfix"> <div class="landing-headline"> <h2>Suggested Uses</h2> <p> You\'ll likely customize your board to your workflow, but here are some potential starting points. </p> </div> <div class="landing-block"> <h3>Event Planning</h3> <p> Use Trello to organize a wedding, hiking trip, or tropical vacation. Keep track of supplies, florists, hotels, photographers, venues, rental cars, or DJs. See what\'s been booked and what\'s been confirmed. Invite fellow organizers and participants and keep them in the loop. </p> <p> <strong> Lists: </strong> Researching, Booked, Confirmed </p> </div> <div class="landing-block"> <h3>Software Development</h3> <p> Get the big picture. See whether a feature is just starting to be designed or about to be shipped. Work privately on your stealth start-up, or make a board public and let users vote and comment on features. </p> <p> <strong> Lists: </strong> Ideas, Design, Development, Implemented, Live </p> </div> <div class="landing-block"> <h3>Personal To-Dos</h3> <p> Ditch your scattered notebooks, sticky notes, and text files. Use Trello for keeping track of grocery items, errands, or house work. </p> <p> <strong> Lists: </strong> To Do, Doing, Done </p> </div> <div class="landing-block"> <h3>Publishing</h3> <p> Assign writers to story leads. Keep track of research files like press releases. Comment and discuss writing. See what\'s ready to be published and what\'s breaking. </p> <p> <strong> Lists: </strong> Lead, Research, Writing, Editing, Published </p> </div> <div class="landing-block"> <h3>Recruiting</h3> <p> The hiring process can be long and difficult to manage. Keep track of whether candidates have received a phone screen or an interview, assign team members to do an interview, and discuss potential employees. </p> <p> <strong> Lists: </strong> Resume, Phone Screen, Interview, Decision </p> </div> <div class="landing-block"> <h3>Freelance and Consulting</h3> <p> Manage clients and engagements. Upload wireframes, reports, and reviews. </p> <p> <strong> Lists: </strong> Leads, Communicated, In Progress, Review, Complete </p> </div> <div class="landing-block"> <h3>Sales</h3> <p> Quickly visualize every section of your sales pipeline. See who is managing what accounts and how far along they are. </p> </div> <div class="landing-block"> <h3>Customer Support</h3> <p> Respond to customer inquiries by referring to your organization\'s boards. Organize customer inquiries and calls. Schedule engagements, assign team members, and keep everybody up to date on progress. </p> </div> </div> </div> <div class="markeddown landing-section landing-elsewhere"> <div class="landing-section-wrapper clearfix"> <div class="landing-headline"> <h2>Stay Up to Date</h2> </div> <div class="landing-block"> <div class="elsewhere-icon blog"> <a target="_blank" class="social-icon blog-icon" href="http://blog.trello.com"></a> </div> <div class="detail"> <h3>Trello Blog</h3> <p>Read the <a href="http://blog.trello.com">Trello Blog</a>.</p> </div> </div> <div class="landing-block"> <div class="elsewhere-icon twitter"> <a target="_blank" class="social-icon twitter-icon" href="https://www.twitter.com/trello"></a> </div> <div class="detail"> <h3>Twitter</h3> <p>Follow @trello on Twitter <a href="https://twitter.com/intent/follow?user_id=360831528">here</a>.</p> </div> </div> <div class="landing-block"> <div class="elsewhere-icon facebook"> <a target="_blank" class="social-icon facebook-icon" href="https://www.facebook.com/TrelloApp"></a> </div> <div class="detail"> <h3>Facebook</h3> <p>Like us on Facebook <a href="https://www.facebook.com/trelloapp">here</a>.</p> </div> </div> </div> </div> <div class="markeddown landing-section landing-footer"> <div class="landing-section-wrapper clearfix"> <p>Made in New York City by Fog Creek Software</p> <a href="http://www.fogcreek.com/?fccmp=trello_landing" title="Fog Creek Software"> <img src="https://d2k1ftgv7pobq7.cloudfront.net/images/17a0f12ca7961ef879477c2f9c40ed02/fog_creek_logo.png"> </a> </div> </div> ',
        badges:'{{#hasUnreadNotifications}} <span class="app-icon small-icon notification-icon light"></span>{{count}} {{/hasUnreadNotifications}} {{#hasVotes}} <span class="app-icon small-icon vote-icon"></span>{{count}} {{/hasVotes}} {{#hasDesc}} <span class="app-icon small-icon edit-icon"></span> {{/hasDesc}} {{#hasComments}} <span class="app-icon small-icon comment-icon"></span>{{count}} {{/hasComments}} {{#hasAttachments}} <span class="app-icon small-icon attachment-icon"></span>{{count}} {{/hasAttachments}} {{#hasTasks}} <span class="app-icon small-icon checklist-icon {{#complete}}light {{/complete}}"></span>{{count}}{{#hasTotal}}/{{total}}{{/hasTotal}} {{/hasTasks}} {{#hasDueDate}} <span class="app-icon small-icon {{lightClass}} date-icon"></span>{{shortDueDate}} {{/hasDueDate}} {{#hasFogBugzLink}} <span class="app-icon small-icon kiwi-icon"></span> {{/hasFogBugzLink}} {{#isSubscribed}} <span class="app-icon small-icon follow-icon"></span> {{/isSubscribed}} {{#isArchived}} <span class="app-icon small-icon archive-icon"></span>Archived {{/isArchived}} ',
        search_input:'<label for="search-text">Global Search</label> <input id="search-text" type="text" autocomplete="off" autocorrect="off" spellcheck="false" value="{{query}}"> <input id="search-submit" type="submit" value="Search"> <a class="header-btn header-search js-search-submit" href="#"> <span class="app-icon light search-icon"></span> </a> ',
        board_desc:'<div class="window-header-utils"> <a class="app-icon close-icon dark-hover js-close-window" href="#" title="Close this dialog window.">Close</a> </div> <div class="window-header clearfix"> <span class="window-header-icon app-icon board-icon" href="#"></span> <div class="window-title non-empty inline {{#__own}} editable {{/__own}} " attr="name"> <h2 class="window-title-text current hide-on-edit"> {{name}} </h2> {{#__own}} <p class="edits-warning quiet">You have unsaved edits on this field. <a href=\'#\' class=\'js-view-edits\'>View edits</a> or <a href=\'#\' class=\'js-discard-edits\'>discard</a>.</p> <div class="edit edit-heavy"> <textarea type="text" class="field single-line"></textarea> </div> {{/__own}} </div> </div> <div class="window-main-col"> <div class="board-description clearfix{{#__ed}} editable{{/__ed}}" attr="desc"> <div class="current markeddown hide-on-edit bottom"> {{^hasDesc}} <p class="bottom"> {{#__ed}}<a class=\'quiet empty\' style="padding: 100px 0;" href="#">No description. Click to edit.</a>{{/__ed}} {{^__ed}}<span class=\'quiet empty\' style="padding: 100px 0;">No description.</span>{{/__ed}} </p> {{/hasDesc}} </div> {{#__ed}} {{#hasDesc}} <p class="bottom js-edit-desc"> <a class="quiet-button hide-on-edit w-img" href="#"><span class="app-icon small-icon edit-icon"></span>Edit the board description.</a> </p> {{/hasDesc}} <p class="edits-warning quiet">You have unsaved edits on this field. <a href=\'#\' class=\'js-view-edits\'>View edits</a> or <a href=\'#\' class=\'js-discard-edits\'>discard</a>.</p> <div class="board-description-edit edit"> <p class="helper"><a href="http://daringfireball.net/projects/markdown/syntax" target="_blank">Markdown</a> accepted</p> <textarea class="field" /> </div> {{/__ed}} </div> </div> ',
        board_watchers:"{{#showWatchers}} {{nWatchers}} people watching. {{/showWatchers}} ",
        board_permissions:'<span title="{{altText}}" class="app-icon small-icon public-status {{permissionLevel}}-icon"></span> ',
        popover_change_email:'<p> Your email address is currently <b>{{email}}</b>. </p> <form> <p id="account-error" class="error"></p> <div class="field"> <label for="email">New Email Address</label> <input id="email" type="email" name="email" value=""> </div> <input type="submit" class="primary js-save-changes" value="Send Confirmation Email"> </form> <hr> <p class="quiet bottom"> This change will take effect after you click on the link in the confirmation email sent to the new email address. </p> ',
        member:'{{#avatarHash}} <img class="member-avatar" height="30" width="30" src="{{__avatarDomain}}/{{avatarHash}}/30.png" alt="{{#deleted}}This member has deleted their account{{/deleted}}{{^deleted}}{{fullName}} ({{username}}){{/deleted}}" title="{{#deleted}}This member has deleted their account{{/deleted}}{{^deleted}}{{fullName}} ({{username}}){{/deleted}}" /> {{/avatarHash}} {{^avatarHash}} <span class="member-initials" title="{{#deleted}}This member has deleted their account{{/deleted}}{{^deleted}}{{fullName}} ({{username}}){{/deleted}}"> {{^deleted}}{{initials}}{{/deleted}} {{#deleted}}?{{/deleted}} </span> {{/avatarHash}} {{#showStatus}}<span class="status {{status}}" title="{{#status_active}}This member is online and viewing Trello.{{/status_active}}{{#status_idle}}This member is idle. They have Trello open but are not looking at it.{{/status_idle}}{{#status_disconnected}}This member is offline.{{/status_disconnected}}"></span>{{/showStatus}} {{#isBoardAdmin}}<span class="admin" title="This member is an admin of this board."></span>{{/isBoardAdmin}} {{#isOrganizationAdmin}}<span class="admin" title="This member is an admin of this organization."></span>{{/isOrganizationAdmin}} ',
        ref_menu:'<div class="js-announce"></div> <ul class="pop-over-list"> <li> <a class="js-info-menu-about" href="/about">About</a> </li> <li> <a class="js-info-menu-guide" href="/guide">Guide</a> </li> <li> <a class="js-info-menu-help" href="/help">Help!</a> </li> <li> <a class="js-info-menu-shortcuts" href="/shortcuts">Shortcuts</a> </li> <li> <a class="js-info-menu-trello-dev" href="https://trello.com/board/4d5ea62fd76aa1136000000c">Trello Development Board</a> </li> <li> <a class="js-info-menu-api js-real-link" href="/docs/">API</a> </li> <li> <a class="js-info-menu-privacy" href="/privacy">Privacy, Security, Data</a> </li> <li> <a target="_blank" class="js-info-menu-tos js-real-link" href="/legal">Terms of Service</a> </li> </ul> <hr> <ul class="pop-over-list"> {{#showAnnouncements}} <li> <a target="_blank" class="js-announcements" href="#" title="Announcements"> Announcements </a> </li> {{/showAnnouncements}} <li> <a target="_blank" class="js-real-link js-info-menu-blog" href="http://blog.trello.com" title="Trello Blog"> Trello Blog </a> </li> <li> <a target="_blank" class="js-real-link js-info-menu-twitter" href="https://www.twitter.com/trello" title="@trello on Twitter"> @trello on Twitter </a> </li> <li> <a target="_blank" class="js-real-link js-info-menu-facebook" href="https://www.facebook.com/TrelloApp" title="Trello on Facebook"> Trello on Facebook </a> </li> </ul> ',
        member_profile:'<div class="window-module gutter clearfix"> {{{bioHtml}}} {{#__ed}}{{^bio}}<p class="quiet"><a href="#">No bio specified</a></p>{{/bio}}{{/__ed}} {{#email}} <p class="email quiet"> {{email}} <a class="js-change-email" href="#">(change)</a> </p> {{/email}} {{#__ed}} <a href="#" class="button-link js-edit-profile" style="margin-top: 16px;"> <span class="app-icon small-icon edit-icon"></span> Edit Name, Initials, or Bio </a> {{/__ed}} </div> <div class="window-module"> <div class="window-module-title"> <span class="app-icon org-icon window-module-title-icon"></span> <h3>Organizations</h3> </div> <div class="bold-list list-orgs gutter"> </div> </div> <div class="window-module"> <div class="window-module-title"> <span class="app-icon activity-icon window-module-title-icon"></span> <h3>Activity</h3> </div> {{#emptyActions}}<p class="empty-list">No Actions</p>{{/emptyActions}} <div class="list-actions"></div> <p class="bottom"> <a class="show-more js-more-actions" href="#">Load More Activity</a> </p> </div> ',
        popover_move_card:'<div class="button-link setting" style="width: 255px; max-width: 255px; margin-bottom: 8px;"> <span class="label">Board</span> <span class="value js-board-value"></span> <label>Board</label> <select class="js-select-board"> {{#boards}} <option value="{{id}}"{{#selected}} selected="selected"{{/selected}}>{{name}}{{#selected}} (current){{/selected}}</option> {{/boards}} </select> </div> <div class="button-link setting" style="width: 163px; margin: 0 8px 8px 0;"> <span class="label">List</span> <span class="value js-list-value"></span> <label>List</label> <select class="js-select-list"></select> </div> <div class="button-link setting" style="width: 70px; margin-bottom: 8px;"> <span class="label">Position</span> <span class="value js-pos-value"></span> <label>Position</label> <select class="js-select-position"></select> </div> <input type="submit" class="primary wide js-commit-position" value="Move"/> ',
        member_board_stats:'<a class="clearfix link-item highlight-icon js-open-board {{#canJoin}}block left{{/canJoin}}" {{#canJoin}}style="margin-top: 2px;"{{/canJoin}} href="{{url}}"> <span class="item-name">{{name}}</span> <span {{#permissionLevel_private}} title="This board is private. It\'s only viewable to members of this board." {{/permissionLevel_private}} {{#permissionLevel_org}} title="This board is only viewable to members of the organization." {{/permissionLevel_org}} {{#permissionLevel_public}} title="This board is public. It\'s viewable to the entire Internet." {{/permissionLevel_public}} class="app-icon small-icon permission-icon {{#permissionLevel_public}} public-icon {{/permissionLevel_public}} {{#permissionLevel_private}} private-icon {{/permissionLevel_private}} {{#permissionLevel_org}} org-private-icon {{/permissionLevel_org}}"></span> {{#__loggedIn}} {{#pinned}} <span title="This board is pinned to your header menu." class="app-icon small-icon pin-icon"> </span> {{/pinned}} <span class="counts"> {{#actionCount}} <span class="count"> <span class="app-icon small-icon activity-icon"></span> {{actionCount}}{{#plus}}+{{/plus}} </span> {{/actionCount}} </span> <span class="board-list-menu app-icon small-icon menu-icon js-boards-list-menu"></span> {{/__loggedIn}} </a> {{#__loggedIn}} {{#canJoin}} <div class="options"> <a class="button-link js-join-board" href="#">Join</a> </div> {{/canJoin}} {{/__loggedIn}} ',
        embedly:'\ufeff<div class="embed embed-{{type}} embed-provider-{{provider_name}}"> {{^type_photo}} {{#requireHttps}}{{{htmlHttps}}}{{/requireHttps}}{{^requireHttps}}{{{html}}}{{/requireHttps}} {{/type_photo}} {{#type_photo}} <a href="{{originalUrl}}" target="_blank"><img src="{{url}}" /></a> {{/type_photo}} </div> ',
        checklist:'<div class="window-module-title no-divider"> <span class="app-icon checklist-icon window-module-title-icon"></span> {{#__ed}} <div class="editable non-empty checklist-title" attr="name"> <h3 class="current hide-on-edit" style="margin-right: 20px;">{{name}}</h3> <div class="edit edit-heavy"> <input type="text" class="field full single-line"></input> </div> <p class="edits-warning quiet">You have unsaved edits on this field. <a href=\'#\' class=\'js-view-edits\'>View edits</a> or <a href=\'#\' class=\'js-discard-edits\'>discard</a>.</p> <span class="app-icon small-icon menu-icon dark-hover hide-on-edit js-open-checklist-menu"></span> </div> {{/__ed}} {{^__ed}} <h3>{{name}}</h3> {{/__ed}} </div> <div class="tasks no-edits"> <div class="task-progress-total gutter"> <div class="progress-current" style="width: 0%"> <span class="progress-percentage">0%</span> </div> </div> <div class="task-list"></div> {{#__ed}} <div class="new-task gutter"> <input type="text" class="new-task-text full" placeholder="Add item"> <div class="add-controls clearfix"> <input type="submit" class="primary confirm js-add-checklist-item" value="Add"> <a href="#" class="app-icon close-icon dark-hover cancel js-cancel-checklist-item"></a> </div> </div> {{/__ed}} </div> ',
        popover_set_email_freq:'<ul class="pop-over-list" name="minutesBetweenSummaries"> <li> <a class="highlight-icon" value="-1"> Never {{#minutesBetweenSummaries_-1}}<span class="app-icon small-icon check-icon"></span>{{/minutesBetweenSummaries_-1}} </a> </li> <li> <a class="highlight-icon" value="60"> Periodically {{#minutesBetweenSummaries_60}}<span class="app-icon small-icon check-icon"></span>{{/minutesBetweenSummaries_60}} </a> </li> <li> <a class="highlight-icon" value="1"> Instantly {{#minutesBetweenSummaries_1}}<span class="app-icon small-icon check-icon"></span>{{/minutesBetweenSummaries_1}} </a> </li> </ul> <hr> <p class="quiet bottom"> Emails combine all notifications that you have not read in Trello. \'Periodically\' means about every hour. \'Instantly\' means every minute. </p> ',
        popover_change_labels:'<ul class="edit-labels-pop-over{{#showShortcuts}} show-shortcuts{{/showShortcuts}}"> {{#labels}} <li> <a class="card-label selectable {{color}}-label {{#isActive}}active{{/isActive}}" label="{{color}}"> {{#name}}{{name}}{{/name}} {{#shortcut}}<span class="shortcut">({{shortcut}})</span>{{/shortcut}} <span class="app-icon light small-icon check-icon"></span> </a> </li> {{/labels}} </ul> {{#__ed}} <div class="{{#hideEditTitles}}hide{{/hideEditTitles}}"> <hr> <p class="bottom"> <a class="quiet-button full js-edit-label-titles" style="padding: 6px 8px;" href="#"> <span class="text">Change label titles...</span> </a> </p> <p class="bottom"> <a class="quiet-button full js-toggle-color-blind-mode" style="padding: 6px 8px;" href="#"> <span class="text">{{cbToggleText}} Color Blind Friendly Mode</span> </a> </p> </div> {{/__ed}} ',
        board_menu_perms:' <div class="button-link setting{{^__own}} disabled{{/__own}}" style="width: 256px; max-width: 256px; float: none;"> <span class="label">Visibility</span> <span class="value"></span> <label>Visibility</label> <select name="permissionLevel"> <option value="private"{{#permissionLevel_private}} selected{{/permissionLevel_private}}> Members </option> {{#hasOrg}} <option value="org"{{#permissionLevel_org}} selected{{/permissionLevel_org}}> Organization </option> {{/hasOrg}} <option value="public"{{#permissionLevel_public}} selected{{/permissionLevel_public}}> Public </option> </select> </div> <hr> <div class="button-link setting{{^__own}} disabled{{/__own}}" style="width: 256px; max-width: 256px; float: none;"> <span class="label">Comments</span> <span class="value"></span> <label>Comments</label> <select name="comments"> <option value="none"{{#comments_none}} selected{{/comments_none}}> Disabled </option> <option value="members"{{#comments_members}} selected{{/comments_members}}> Members </option> {{#hasOrg}} <option value="org"{{#comments_org}} selected{{/comments_org}}{{#permissionLevel_private}} disabled{{/permissionLevel_private}}> Organization Members </option> {{/hasOrg}} <option value="public"{{#comments_public}} selected{{/comments_public}}{{#permissionLevel_private}} disabled{{/permissionLevel_private}} {{#permissionLevel_org}} disabled{{/permissionLevel_org}}> Public Members </option> </select> </div> <hr> <div class="button-link setting{{^__own}} disabled{{/__own}}" style="width: 256px; max-width: 256px; float: none;"> <span class="label">Voting</span> <span class="value"></span> <label>Voting</label> <select name="voting"> <option value="none"{{#voting_none}} selected{{/voting_none}}> Disabled </option> <option value="members"{{#voting_members}} selected{{/voting_members}}> Members </option> {{#hasOrg}} <option value="org"{{#voting_org}} selected{{/voting_org}}{{#permissionLevel_private}} disabled{{/permissionLevel_private}}> Organization Members </option> {{/hasOrg}} <option value="public"{{#voting_public}} selected{{/voting_public}}{{#permissionLevel_private}} disabled{{/permissionLevel_private}} {{#permissionLevel_org}} disabled{{/permissionLevel_org}}> Public Members </option> </select> </div> <hr> <div class="button-link setting{{^__own}} disabled{{/__own}}" style="width: 256px; max-width: 256px; float: none;"> <span class="label">Adding Members</span> <span class="value"></span> <label>Adding Members</label> <select name="invitations"> <option value="owners"{{#invitations_owners}} selected{{/invitations_owners}}> Admins </option> <option value="members"{{#invitations_members}} selected{{/invitations_members}}> Members </option> </select> </div> {{#permissionLevel_org}} <hr> <div class="button-link setting{{^__own}} disabled{{/__own}}" style="width: 256px; max-width: 256px; float: none;"> <span class="label">Allow organization members to join</span> <span class="value"></span> <label>Allow organization members to join</label> <select name="selfJoin"> <option value="true"{{#selfJoin_true}} selected{{/selfJoin_true}}{{#permissionLevel_private}} disabled{{/permissionLevel_private}}> Enabled </option> <option value="false"{{#selfJoin_false}} selected{{/selfJoin_false}}{{#permissionLevel_private}} disabled{{/permissionLevel_private}}> Disabled </option> </select> </div> {{/permissionLevel_org}} ',
        card_detail:'<div class="window-header-utils"> <a class="app-icon close-icon dark-hover js-close-window" href="#" title="Close this dialog window.">Close</a> <a class="app-icon menu-icon dark-hover js-card-menu" href="#" title="Open card menu.">Open Card Menu</a> </div> <div class="window-header clearfix"> <span class="window-header-icon app-icon card-icon" href="#"></span> <div class="window-title card-detail-title non-empty inline {{#__ed}} editable {{/__ed}} " attr="name"> <h2 class="window-title-text current hide-on-edit"> {{name}} </h2> {{#__ed}} <p class="edits-warning quiet">You have unsaved edits on this field. <a href=\'#\' class=\'js-view-edits\'>View edits</a> or <a href=\'#\' class=\'js-discard-edits\'>discard</a>.</p> <div class="edit edit-heavy"> <textarea type="text" class="field single-line"></textarea> </div> {{/__ed}} <div class="quiet hide-on-edit window-header-inline-content js-current-list"></div> </div> </div> <div class="window-main-col"> <div class="card-detail-metadata clearfix gutter"> <div class="badges clearfix"></div> </div> <div class="window-main-col-content clearfix"> <div class="card-detail-desc window-module gutter clearfix {{#__ed}} editable {{/__ed}}" attr="desc"> <div class="current markeddown hide-on-edit bottom"{{^desc}} style="display:none"{{/desc}}></div> {{#__ed}} <p class="bottom"><a class="hide-on-edit quiet-button w-img js-edit-desc" href="#"><span class="app-icon small-icon edit-icon"></span>Edit the card description.</a></p> <div class="card-detail-edit edit"> <p class="helper"><a href="http://daringfireball.net/projects/markdown/syntax" target="_blank">Markdown</a> accepted</p> <textarea class="field" /> </div> <p class="edits-warning quiet">You have unsaved edits on this field. <a href=\'#\' class=\'js-view-edits\'>View edits</a> or <a href=\'#\' class=\'js-discard-edits\'>discard</a>.</p> {{/__ed}} </div> <div class="checklists window-module clearfix no-edits"></div> <div class="window-module"> <div class="window-module-title no-divider"> <span class="app-icon activity-icon window-module-title-icon"></span> <h3>Activity</h3> </div> {{#canComment}} <div class="new-comment"> <textarea class="new-comment-input js-no-ie-placeholder" placeholder="Write a comment..." /> <div class="add-controls clearfix"> <input type="submit" class="primary confirm js-add-comment" value="Comment"> <a href="#" class="app-icon close-icon dark-hover cancel js-cancel-comment"></a> <a href="#" class="option touch-hide js-open-mention-selector"><span class="app-icon member-icon"></span></a> </div> </div> {{/canComment}} <div class="list-actions"></div> {{#loading}} <div class="spinner loading js-loading-card-actions"></div> {{/loading}} </div> </div> </div> <div class="window-sidebar"> <div class="window-module card-label-list clearfix"> <h3 class="inline">Labels</h3> <div class="card-labels clear"></div> {{#__ed}} <a class="button-link js-edit-labels"> <span class="app-icon small-icon label-icon"></span> Edit Labels&hellip; </a> {{/__ed}} </div> <div class="window-module clearfix"> <h3>Members</h3> <div class="card-detail-members clearfix"></div> <p class="no-mems empty hide">No members assigned.</p> {{#__ed}} <a class="button-link js-change-card-members"> <span class="app-icon small-icon member-icon"></span> Assign&hellip; </a> {{/__ed}} </div> <div class="window-module clearfix attachments"> <h3>Attachments</h3> <ul class="attachment-list"></ul> <p class="no-attachments empty hide">No attachments.</p> {{#__ed}} <div class="uploader ios-hide"> <form class="realfile" action="/api/card/{{id}}" method="post" enctype="multipart/form-data"> <input type="hidden" name="token" value="" /> <input type="hidden" name="method" value="attachFile" /> <input type="hidden" name="format" value="http" /> <input type="file" name="upload" class="js-attach-file" tabindex="-1"/> </form> <a class="button-link fakefile js-fakefile"> <span class="app-icon small-icon attachment-icon"></span> Upload </a> </div> <p class="error js-file-too-large" style="display:none; -moz-border-radius: 3px; -webkit-border-radius: 3px; font-weight: bold; margin: 8px 0 0; padding: 6px; background: #e3e3e3; ">File too large. 10mb limit.</p> {{/__ed}} </div> {{^__ed}} {{#showActions}} <div class="window-module clearfix"> <h3>Actions</h3> <div class="clearfix"> {{#canSubscribe}} <div class="js-subscribe-sidebar-button"></div> {{/canSubscribe}} {{#canVote}} <div class="js-vote-sidebar-button"></div> {{/canVote}} </div> </div> {{/showActions}} {{/__ed}} {{#__ed}} <div class="window-module other-actions clearfix"> <h3>Actions</h3> <div class="clearfix"> <div class="js-subscribe-sidebar-button"></div> <div class="js-vote-sidebar-button"></div> <a class="button-link js-add-checklist-menu"> <span class="app-icon small-icon checklist-icon"></span> Add checklist... </a> <a class="button-link js-add-due-date"> <span class="app-icon small-icon date-icon"></span> Due date&hellip; </a> <a class="button-link js-move-card"> <span class="app-icon small-icon move-icon"></span> Move&hellip; </a> <a class="button-link js-copy-card"> <span class="app-icon small-icon card-icon"></span> Copy&hellip; </a> <a class="button-link js-close-card"> <span class="app-icon small-icon archive-icon"></span> Archive </a> <a class="button-link js-reopen-card"> <span class="app-icon small-icon reopen-icon"></span> Send to board </a> </div> </div> {{/__ed}} <div class="window-module quiet-actions clearfix"> <p class="quiet" style="padding: 4px 6px; margin: 0;"> Card #{{idShort}} </p> <a class="quiet-button js-share" href="#"> <span class="text">Share, Print, and Export</span> </a> {{#__ed}} <a class="quiet-button js-delete-card-popover" href="#"> <span class="text">Delete this card</span> </a> {{/__ed}} </div> </div> ',
        manual_help:'<div class="gutter"> <h3>Read the Guide</h3> <p> Not sure of the difference between a list and a checklist? We\'ve collected all the common Trello terms and described what they are and how to use them. Good for beginners or those times when you forget how that one thing works. Visit the <a href="/guide">Guide</a>. </p> <h3>Shortcuts</h3> <p> Trello is loaded with keyboard shortcuts so you can vote, move cards, archive, cancel, and assign users with fewer clicks. We\'ve collected them all <a href="/shortcuts">here</a>. </p> <h3>Features and Ideas</h3> <p> Just thought of a great idea for Trello? We might already be working on it! We use a public Trello board to develop Trello so you can see, comment, and vote on features. Visit our <a href="https://trello.com/board/4d5ea62fd76aa1136000000c">Trello Development board</a>. </p> <p> If your feature isn\'t there, tell us about it on Twitter! Follow <a href="https://twitter.com/intent/follow?user_id=360831528">@trello</a> and send a tweet to us about your idea. If your idea won\'t fit into 140 characters, you can email it to <a href="mailto:feature-ideas@trello.com">feature-ideas@trello.com</a>. We read all feature ideas but may not be able to respond to them individually. </p> <h3>How do I... ?</h3> <p> Your question may already be answered! There\'s a wealth of information on how to do stuff in Trello on the <a href="http://webapps.stackexchange.com/">Web Applications Stack Exchange</a> community. The Web Applications Stack Exchange is a free, community-driven Q&amp;A site for power users of web applications. It\'s a great place to learn how to use Trello (or Gmail or Twitter or YouTube) well. See <a href="http://webapps.stackexchange.com/questions/tagged/trello">questions tagged trello</a>. </p> <p> If you want to know how to do something, feel free to ask a question there and tag it trello. The community will be there, and the Trello team is there regularly, too. </p> <h3>Problems, Bugs, and Crashes</h3> <p> If you\'ve got a bug to report, please first check the <a href="https://trello.com/board/4d5ea62fd76aa1136000000c">Trello Development board</a> where we maintain a list of known issues and bugs. Bugs have the red label. </p> <p> If you can\'t find the bug, are having problems with your account, or are experiencing crashes please email Fog Creek at <a href="mailto:support@trello.com">support@trello.com</a>. If you could include the browser, operating system and any errors, it will help us a bunch. </p> </div> ',
        board_menu_settings:'{{#__ed}} {{#__own}} <li><a class="js-rename" href="#">Rename Board</a></li> <li><a class="js-org" href="#">Change Organization</a></li> {{/__own}} <li><a class="js-permissions" href="#">Permissions</a></li> <li><a class="js-desc" href="#">Board Description</a></li> {{/__ed}} <li><a class="js-layout" href="#">Layout Options</a></li> ',
        member_large_avatar:'<div class="mem-info"> <h3 class="bottom"><a class="js-profile" href="/{{username}}">{{fullName}}</a></h3> <p class="quiet">@{{username}}</p> </div> <img src="{{__avatarDomain}}/{{avatarHash}}/original.png" alt="{{#deleted}}This member has deleted their account{{/deleted}}{{^deleted}}{{fullName}} ({{username}}){{/deleted}}" title="{{#deleted}}This member has deleted their account{{/deleted}}{{^deleted}}{{fullName}} ({{username}}){{/deleted}}" /> ',
        notification:'<div class="member js-show-mem-menu">{{>member}}</div> <div class="phenom-desc{{#invitedToBoard}}{{#stillInvited}} invite{{/stillInvited}}{{/invitedToBoard}}{{#invitedToOrganization}}{{#stillInvited}} invite{{/stillInvited}}{{/invitedToOrganization}}"> {{#member}}<a class="inline-object js-show-mem-menu" href="#">{{fullName}}</a>{{/member}} {{#entities}} {{>entity}} {{/entities}} {{#stillInvited}} <div class="phenom-opts"> <a class="button-link js-accept-invitation" href="#">Accept</a> <a class="button-link js-reject-invitation" href="#">Reject</a> </div> {{/stillInvited}} </div> <p class="phenom-meta quiet"> {{#date}}<span class="date" dt="{{date}}"></span>{{/date}} </p> ',
        label:'<span class="card-label {{color}}-label" title="{{#name}}{{name}}{{/name}}{{^name}}{{color}} label (default){{/name}}"> {{#name}}{{name}}{{/name}} {{^name}}&nbsp;{{/name}} </span> ',
        member_on_board_or_org_menu:'<li> <a class="{{#canChangeRole}}js-change-role{{/canChangeRole}}{{^canChangeRole}}disabled{{/canChangeRole}}" href="#"> Role:{{#memberIsAdmin}} Admin {{/memberIsAdmin}}{{^memberIsAdmin}} Member{{/memberIsAdmin}} {{#canChangeRole}} <span class="quiet">(change)</span>{{/canChangeRole}} </a> </li> {{#isBoard}} <li><a href="{{boardProfileUrl}}">View Member\'s Board Activity</a></li> {{/isBoard}} {{#canRemove}} <li> <a class="js-remove-member"> {{#isMe}} Leave {{object}} {{/isMe}} {{^isMe}} Remove from {{object}} {{/isMe}} </a> </li> {{/canRemove}} {{^canRemove}} {{#isMe}} {{#isMoreThanOneMember}} {{#memberIsAdmin}} <li> <hr> <p class="quiet bottom"> You can\'t leave because you are the only admin. To make another user an admin, click their avatar, select "Role: Member (change)", and select "Admin". </p> </li> {{/memberIsAdmin}} {{/isMoreThanOneMember}} {{/isMe}} {{/canRemove}} ',
        member_inline:'{{#avatarHash}} <img class="inline-member-av" src="{{__avatarDomain}}/{{avatarHash}}/30.png" alt="{{fullName}} ({{username}})" title="{{fullName}} ({{username}})" /> {{/avatarHash}} <span class="bold">{{fullName}}</span> ',
        archive:'<div class="window-header-utils"> <a class="app-icon close-icon dark-hover js-close-window" href="#">Close</a> </div> <div class="window-header"> <span class="window-header-icon app-icon archive-icon"></span> <h2 class="window-title">{{name}}</h2> </div> <div class="window-main-col"> {{^empty}} <div class="window-module clearfix"> <ul class="archive-items bold-list gutter"></ul> </div> {{/empty}} {{#empty}} <p class="empty-list">{{emptyMessage}}</p> {{/empty}} </div> <div class="window-sidebar"> <p class="helper">You have to have been a board admin to re-open a closed board.</p> </div> ',
        card_inline:'<a href="{{cardUrl}}" class="inline-object"{{#nameTruncated}} title="{{name}}"{{/nameTruncated}}> {{#nameTruncated}}{{nameTruncated}}...{{/nameTruncated}} {{^nameTruncated}}{{name}}{{/nameTruncated}} </a> ',
        card_detail_vote_btn_sidebar:'{{#canVote}} <a class="button-link {{#voted}}is-on {{/voted}} js-{{#voted}}un{{/voted}}vote"> <span class="app-icon small-icon vote-icon"></span> Vote <span class="on"><span class="app-icon small-icon light check-icon"></span></span> </a> {{/canVote}} ',
        popover_confirm_member_delete:'<p> Deleting your account is permanent. Would you like us to send an email to <b>{{email}}</b> that contains a link that you can use to delete your account? </p> <input type="submit" class="js-delete-member" value="Send the Email"> <input type="submit" class="js-cancel-delete" value="Never Mind"> ',
        popover_helper_new_board_add_org:'<p class="bottom"> Organizations make sharing and working within a group even easier. <a href="/org/create">Create an organization.</a> </p> '
    };
    C("jquery")&&function(d,c){
        function b(b){
            var c=C[b]={},e,f,b=b.split(/\s+/);
            for(e=0,f=b.length;e<f;e++)c[b[e]]=!0;
            return c
            }
            function e(b,e,f){
            if(f===c&&1===b.nodeType)if(f="data-"+e.replace(J,"-$1").toLowerCase(),f=b.getAttribute(f),"string"===typeof f){
                try{
                    f="true"===f?!0:"false"===f?!1:"null"===f?null:k.isNumeric(f)?+f:F.test(f)?k.parseJSON(f):f
                    }catch(d){}
                k.data(b,e,f)
                }else f=c;
            return f
            }
            function f(b){
            for(var c in b)if(!("data"===c&&k.isEmptyObject(b[c]))&&"toJSON"!==c)return!1;return!0
            }
            function g(b,
            c,e){
            var f=c+"defer",d=c+"queue",j=c+"mark",g=k._data(b,f);
            g&&("queue"===e||!k._data(b,d))&&("mark"===e||!k._data(b,j))&&setTimeout(function(){
                !k._data(b,d)&&!k._data(b,j)&&(k.removeData(b,f,!0),g.fire())
                },0)
            }
            function h(){
            return!1
            }
            function j(){
            return!0
            }
            function l(b,c,e){
            c=c||0;
            if(k.isFunction(c))return k.grep(b,function(b,f){
                return!!c.call(b,f,b)===e
                });
            if(c.nodeType)return k.grep(b,function(b){
                return b===c===e
                });
            if("string"===typeof c){
                var f=k.grep(b,function(b){
                    return 1===b.nodeType
                    });
                if(ja.test(c))return k.filter(c,
                    f,!e);
                c=k.filter(c,f)
                }
                return k.grep(b,function(b){
                return 0<=k.inArray(b,c)===e
                })
            }
            function o(b){
            var c=ka.split("|"),b=b.createDocumentFragment();
            if(b.createElement)for(;c.length;)b.createElement(c.pop());
            return b
            }
            function q(b,c){
            if(1===c.nodeType&&k.hasData(b)){
                var e,f,d;
                f=k._data(b);
                var j=k._data(c,f),g=f.events;
                if(g)for(e in delete j.handle,j.events={},g)for(f=0,d=g[e].length;f<d;f++)k.event.add(c,e,g[e][f]);j.data&&(j.data=k.extend({},j.data))
                }
            }
        function A(b,c){
        var e;
        1===c.nodeType&&(c.clearAttributes&&
            c.clearAttributes(),c.mergeAttributes&&c.mergeAttributes(b),e=c.nodeName.toLowerCase(),"object"===e?c.outerHTML=b.outerHTML:"input"===e&&("checkbox"===b.type||"radio"===b.type)?(b.checked&&(c.defaultChecked=c.checked=b.checked),c.value!==b.value&&(c.value=b.value)):"option"===e?c.selected=b.defaultSelected:"input"===e||"textarea"===e?c.defaultValue=b.defaultValue:"script"===e&&c.text!==b.text&&(c.text=b.text),c.removeAttribute(k.expando),c.removeAttribute("_submit_attached"),c.removeAttribute("_change_attached"))
        }
    function i(b){
        return"undefined"!==typeof b.getElementsByTagName?b.getElementsByTagName("*"):"undefined"!==typeof b.querySelectorAll?b.querySelectorAll("*"):[]
        }
        function s(b){
        if("checkbox"===b.type||"radio"===b.type)b.defaultChecked=b.checked
            }
            function x(b){
        var c=(b.nodeName||"").toLowerCase();
        "input"===c?s(b):"script"!==c&&"undefined"!==typeof b.getElementsByTagName&&k.grep(b.getElementsByTagName("input"),s)
        }
        function H(b,c,e){
        var f="width"===c?b.offsetWidth:b.offsetHeight,d="width"===c?1:0;
        if(0<f){
            if("border"!==
                e)for(;4>d;d+=2)e||(f-=parseFloat(k.css(b,"padding"+ab[d]))||0),f="margin"===e?f+(parseFloat(k.css(b,e+ab[d]))||0):f-(parseFloat(k.css(b,"border"+ab[d]+"Width"))||0);
            return f+"px"
            }
            f=rb(b,c);
        if(0>f||null==f)f=b.style[c];
        if(Da.test(f))return f;
        f=parseFloat(f)||0;
        if(e)for(;4>d;d+=2)f+=parseFloat(k.css(b,"padding"+ab[d]))||0,"padding"!==e&&(f+=parseFloat(k.css(b,"border"+ab[d]+"Width"))||0),"margin"===e&&(f+=parseFloat(k.css(b,e+ab[d]))||0);
        return f+"px"
        }
        function B(b){
        return function(c,e){
            "string"!==
            typeof c&&(e=c,c="*");
            if(k.isFunction(e))for(var f=c.toLowerCase().split(Wa),d=0,j=f.length,g,h;d<j;d++)g=f[d],(h=/^\+/.test(g))&&(g=g.substr(1)||"*"),g=b[g]=b[g]||[],g[h?"unshift":"push"](e)
                }
            }
    function I(b,e,f,d,j,g){
    j=j||e.dataTypes[0];
    g=g||{};
    
    g[j]=!0;
    for(var j=b[j],h=0,l=j?j.length:0,s=b===Ja,o;h<l&&(s||!o);h++)o=j[h](e,f,d),"string"===typeof o&&(!s||g[o]?o=c:(e.dataTypes.unshift(o),o=I(b,e,f,d,o,g)));
    if((s||!o)&&!g["*"])o=I(b,e,f,d,"*",g);
    return o
    }
    function L(b,e){
    var f,d,j=k.ajaxSettings.flatOptions||

    {};
    
    for(f in e)e[f]!==c&&((j[f]?b:d||(d={}))[f]=e[f]);d&&k.extend(!0,b,d)
    }
    function M(b,c,e,f){
    if(k.isArray(c))k.each(c,function(c,d){
        e||gb.test(b)?f(b,d):M(b+"["+("object"===typeof d?c:"")+"]",d,e,f)
        });
    else if(!e&&"object"===k.type(c))for(var d in c)M(b+"["+d+"]",c[d],e,f);else f(b,c)
        }
        function P(){
    try{
        return new d.XMLHttpRequest
        }catch(b){}
}
function w(){
    setTimeout(m,0);
    return Ia=k.now()
    }
    function m(){
    Ia=c
    }
    function n(b,c){
    var e={};
    
    k.each(Ha.concat.apply([],Ha.slice(0,c)),function(){
        e[this]=b
        });
    return e
    }
function v(b){
    if(!Ta[b]){
        var c=t.body,e=k("<"+b+">").appendTo(c),f=e.css("display");
        e.remove();
        if("none"===f||""===f){
            za||(za=t.createElement("iframe"),za.frameBorder=za.width=za.height=0);
            c.appendChild(za);
            if(!tb||!za.createElement)tb=(za.contentWindow||za.contentDocument).document,tb.write((k.support.boxModel?"<!doctype html>":"")+"<html><body>"),tb.close();
            e=tb.createElement(b);
            tb.body.appendChild(e);
            f=k.css(e,"display");
            c.removeChild(za)
            }
            Ta[b]=f
        }
        return Ta[b]
    }
    function u(b){
    return k.isWindow(b)?
    b:9===b.nodeType?b.defaultView||b.parentWindow:!1
    }
    var t=d.document,z=d.navigator,y=d.location,k=function(){
    function b(){
        if(!e.isReady){
            try{
                t.documentElement.doScroll("left")
                }catch(c){
                setTimeout(b,1);
                return
            }
            e.ready()
            }
        }
    var e=function(b,c){
    return new e.fn.init(b,c,g)
    },f=d.jQuery,j=d.$,g,h=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,l=/\S/,s=/^\s+/,o=/\s+$/,q=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,x=/^[\],:{}\s]*$/,k=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,A=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
B=/(?:^|:|,)(?:\s*\[)+/g,i=/(webkit)[ \/]([\w.]+)/,H=/(opera)(?:.*version)?[ \/]([\w.]+)/,I=/(msie) ([\w.]+)/,G=/(mozilla)(?:.*? rv:([\w.]+))?/,w=/-([a-z]|[0-9])/ig,L=/^-ms-/,M=function(b,c){
    return(c+"").toUpperCase()
    },K=z.userAgent,P,m,n=Object.prototype.toString,Q=Object.prototype.hasOwnProperty,v=Array.prototype.push,u=Array.prototype.slice,ca=String.prototype.trim,Ka=Array.prototype.indexOf,V={};

e.fn=e.prototype={
    constructor:e,
    init:function(b,f,d){
        var j;
        if(!b)return this;
        if(b.nodeType)return this.context=
            this[0]=b,this.length=1,this;
        if("body"===b&&!f&&t.body)return this.context=t,this[0]=t.body,this.selector=b,this.length=1,this;
        if("string"===typeof b){
            if((j="<"===b.charAt(0)&&">"===b.charAt(b.length-1)&&3<=b.length?[null,b,null]:h.exec(b))&&(j[1]||!f)){
                if(j[1])return d=(f=f instanceof e?f[0]:f)?f.ownerDocument||f:t,(b=q.exec(b))?e.isPlainObject(f)?(b=[t.createElement(b[1])],e.fn.attr.call(b,f,!0)):b=[d.createElement(b[1])]:(b=e.buildFragment([j[1]],[d]),b=(b.cacheable?e.clone(b.fragment):b.fragment).childNodes),
                    e.merge(this,b);
                if((f=t.getElementById(j[2]))&&f.parentNode){
                    if(f.id!==j[2])return d.find(b);
                    this.length=1;
                    this[0]=f
                    }
                    this.context=t;
                this.selector=b;
                return this
                }
                return!f||f.jquery?(f||d).find(b):this.constructor(f).find(b)
            }
            if(e.isFunction(b))return d.ready(b);
        b.selector!==c&&(this.selector=b.selector,this.context=b.context);
        return e.makeArray(b,this)
        },
    selector:"",
    jquery:"1.7.2",
    length:0,
    size:function(){
        return this.length
        },
    toArray:function(){
        return u.call(this,0)
        },
    get:function(b){
        return null==b?this.toArray():
        0>b?this[this.length+b]:this[b]
        },
    pushStack:function(b,c,f){
        var d=this.constructor();
        e.isArray(b)?v.apply(d,b):e.merge(d,b);
        d.prevObject=this;
        d.context=this.context;
        "find"===c?d.selector=this.selector+(this.selector?" ":"")+f:c&&(d.selector=this.selector+"."+c+"("+f+")");
        return d
        },
    each:function(b,c){
        return e.each(this,b,c)
        },
    ready:function(b){
        e.bindReady();
        P.add(b);
        return this
        },
    eq:function(b){
        b=+b;
        return-1===b?this.slice(b):this.slice(b,b+1)
        },
    first:function(){
        return this.eq(0)
        },
    last:function(){
        return this.eq(-1)
        },
    slice:function(){
        return this.pushStack(u.apply(this,arguments),"slice",u.call(arguments).join(","))
        },
    map:function(b){
        return this.pushStack(e.map(this,function(c,e){
            return b.call(c,e,c)
            }))
        },
    end:function(){
        return this.prevObject||this.constructor(null)
        },
    push:v,
    sort:[].sort,
    splice:[].splice
    };
    
e.fn.init.prototype=e.fn;
e.extend=e.fn.extend=function(){
    var b,f,d,j,g,h=arguments[0]||{},l=1,s=arguments.length,o=!1;
    "boolean"===typeof h&&(o=h,h=arguments[1]||{},l=2);
    "object"!==typeof h&&!e.isFunction(h)&&(h=

    {});
    s===l&&(h=this,--l);
    for(;l<s;l++)if(null!=(b=arguments[l]))for(f in b)d=h[f],j=b[f],h!==j&&(o&&j&&(e.isPlainObject(j)||(g=e.isArray(j)))?(g?(g=!1,d=d&&e.isArray(d)?d:[]):d=d&&e.isPlainObject(d)?d:{},h[f]=e.extend(o,d,j)):j!==c&&(h[f]=j));return h
    };
    
e.extend({
    noConflict:function(b){
        d.$===e&&(d.$=j);
        b&&d.jQuery===e&&(d.jQuery=f);
        return e
        },
    isReady:!1,
    readyWait:1,
    holdReady:function(b){
        b?e.readyWait++:e.ready(!0)
        },
    ready:function(b){
        if(!0===b&&!--e.readyWait||!0!==b&&!e.isReady){
            if(!t.body)return setTimeout(e.ready,
                1);
            e.isReady=!0;
            !0!==b&&0<--e.readyWait||(P.fireWith(t,[e]),e.fn.trigger&&e(t).trigger("ready").off("ready"))
            }
        },
bindReady:function(){
    if(!P){
        P=e.Callbacks("once memory");
        if("complete"===t.readyState)return setTimeout(e.ready,1);
        if(t.addEventListener)t.addEventListener("DOMContentLoaded",m,!1),d.addEventListener("load",e.ready,!1);
        else if(t.attachEvent){
            t.attachEvent("onreadystatechange",m);
            d.attachEvent("onload",e.ready);
            var c=!1;
            try{
                c=null==d.frameElement
                }catch(f){}
            t.documentElement.doScroll&&c&&
            b()
            }
        }
},
isFunction:function(b){
    return"function"===e.type(b)
    },
isArray:Array.isArray||function(b){
    return"array"===e.type(b)
    },
isWindow:function(b){
    return null!=b&&b==b.window
    },
isNumeric:function(b){
    return!isNaN(parseFloat(b))&&isFinite(b)
    },
type:function(b){
    return null==b?""+b:V[n.call(b)]||"object"
    },
isPlainObject:function(b){
    if(!b||"object"!==e.type(b)||b.nodeType||e.isWindow(b))return!1;
    try{
        if(b.constructor&&!Q.call(b,"constructor")&&!Q.call(b.constructor.prototype,"isPrototypeOf"))return!1
            }catch(f){
        return!1
        }
        for(var d in b);
    return d===c||Q.call(b,d)
    },
isEmptyObject:function(b){
    for(var c in b)return!1;return!0
    },
error:function(b){
    throw Error(b);
},
parseJSON:function(b){
    if("string"!==typeof b||!b)return null;
    b=e.trim(b);
    if(d.JSON&&d.JSON.parse)return d.JSON.parse(b);
    if(x.test(b.replace(k,"@").replace(A,"]").replace(B,"")))return(new Function("return "+b))();
    e.error("Invalid JSON: "+b)
    },
parseXML:function(b){
    if("string"!==typeof b||!b)return null;
    var f,j;
    try{
        d.DOMParser?(j=new DOMParser,f=j.parseFromString(b,"text/xml")):(f=
            new ActiveXObject("Microsoft.XMLDOM"),f.async="false",f.loadXML(b))
        }catch(g){
        f=c
        }(!f||!f.documentElement||f.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+b);
    return f
    },
noop:function(){},
globalEval:function(b){
    b&&l.test(b)&&(d.execScript||function(b){
        d.eval.call(d,b)
        })(b)
    },
camelCase:function(b){
    return b.replace(L,"ms-").replace(w,M)
    },
nodeName:function(b,c){
    return b.nodeName&&b.nodeName.toUpperCase()===c.toUpperCase()
    },
each:function(b,f,d){
    var j,g=0,h=b.length,l=h===c||e.isFunction(b);
    if(d)if(l)for(j in b){
        if(!1===f.apply(b[j],d))break
    }else for(;g<h&&!(!1===f.apply(b[g++],d)););
    else if(l)for(j in b){
        if(!1===f.call(b[j],j,b[j]))break
    }else for(;g<h&&!(!1===f.call(b[g],g,b[g++])););
    return b
    },
trim:ca?function(b){
    return null==b?"":ca.call(b)
    }:function(b){
    return null==b?"":b.toString().replace(s,"").replace(o,"")
    },
makeArray:function(b,c){
    var f=c||[];
    if(null!=b){
        var d=e.type(b);
        null==b.length||"string"===d||"function"===d||"regexp"===d||e.isWindow(b)?v.call(f,b):e.merge(f,b)
        }
        return f
    },
inArray:function(b,c,e){
    var f;
    if(c){
        if(Ka)return Ka.call(c,b,e);
        f=c.length;
        for(e=e?0>e?Math.max(0,f+e):e:0;e<f;e++)if(e in c&&c[e]===b)return e
            }
            return-1
    },
merge:function(b,e){
    var f=b.length,d=0;
    if("number"===typeof e.length)for(var j=e.length;d<j;d++)b[f++]=e[d];else for(;e[d]!==c;)b[f++]=e[d++];
    b.length=f;
    return b
    },
grep:function(b,c,e){
    for(var f=[],d,e=!!e,j=0,g=b.length;j<g;j++)d=!!c(b[j],j),e!==d&&f.push(b[j]);
    return f
    },
map:function(b,f,d){
    var j,g,h=[],l=0,s=b.length;
    if(b instanceof e||s!==c&&"number"===
        typeof s&&(0<s&&b[0]&&b[s-1]||0===s||e.isArray(b)))for(;l<s;l++)j=f(b[l],l,d),null!=j&&(h[h.length]=j);else for(g in b)j=f(b[g],g,d),null!=j&&(h[h.length]=j);return h.concat.apply([],h)
    },
guid:1,
proxy:function(b,f){
    if("string"===typeof f)var d=b[f],f=b,b=d;
    if(!e.isFunction(b))return c;
    var j=u.call(arguments,2),d=function(){
        return b.apply(f,j.concat(u.call(arguments)))
        };
        
    d.guid=b.guid=b.guid||d.guid||e.guid++;
    return d
    },
access:function(b,f,d,j,g,h,l){
    var s,o=null==d,ra=0,q=b.length;
    if(d&&"object"===typeof d){
        for(ra in d)e.access(b,
            f,ra,d[ra],1,h,j);g=1
        }else if(j!==c){
        s=l===c&&e.isFunction(j);
        o&&(s?(s=f,f=function(b,c,f){
            return s.call(e(b),f)
            }):(f.call(b,j),f=null));
        if(f)for(;ra<q;ra++)f(b[ra],d,s?j.call(b[ra],ra,f(b[ra],d)):j,l);
        g=1
        }
        return g?b:o?f.call(b):q?f(b[0],d):h
    },
now:function(){
    return(new Date).getTime()
    },
uaMatch:function(b){
    b=b.toLowerCase();
    b=i.exec(b)||H.exec(b)||I.exec(b)||0>b.indexOf("compatible")&&G.exec(b)||[];
    return{
        browser:b[1]||"",
        version:b[2]||"0"
        }
    },
sub:function(){
    function b(c,e){
        return new b.fn.init(c,e)
        }
    e.extend(!0,b,this);
    b.superclass=this;
    b.fn=b.prototype=this();
    b.fn.constructor=b;
    b.sub=this.sub;
    b.fn.init=function(f,d){
        d&&d instanceof e&&!(d instanceof b)&&(d=b(d));
        return e.fn.init.call(this,f,d,c)
        };
        
    b.fn.init.prototype=b.fn;
    var c=b(t);
    return b
    },
browser:{}
});
e.each("Boolean,Number,String,Function,Array,Date,RegExp,Object".split(","),function(b,c){
    V["[object "+c+"]"]=c.toLowerCase()
    });
K=e.uaMatch(K);
K.browser&&(e.browser[K.browser]=!0,e.browser.version=K.version);
e.browser.webkit&&(e.browser.safari=
    !0);
l.test("\u00a0")&&(s=/^[\s\xA0]+/,o=/[\s\xA0]+$/);
g=e(t);
t.addEventListener?m=function(){
    t.removeEventListener("DOMContentLoaded",m,!1);
    e.ready()
    }:t.attachEvent&&(m=function(){
    "complete"===t.readyState&&(t.detachEvent("onreadystatechange",m),e.ready())
    });
return e
}(),C={};

k.Callbacks=function(e){
    var e=e?C[e]||b(e):{},f=[],d=[],j,g,h,l,s,o,q=function(b){
        var c,d,j,g;
        for(c=0,d=b.length;c<d;c++)j=b[c],g=k.type(j),"array"===g?q(j):"function"===g&&(!e.unique||!A.has(j))&&f.push(j)
            },x=function(b,c){
        c=
        c||[];
        j=!e.memory||[b,c];
        h=g=!0;
        o=l||0;
        l=0;
        for(s=f.length;f&&o<s;o++)if(!1===f[o].apply(b,c)&&e.stopOnFalse){
            j=!0;
            break
        }
        h=!1;
        f&&(e.once?!0===j?A.disable():f=[]:d&&d.length&&(j=d.shift(),A.fireWith(j[0],j[1])))
        },A={
        add:function(){
            if(f){
                var b=f.length;
                q(arguments);
                h?s=f.length:j&&!0!==j&&(l=b,x(j[0],j[1]))
                }
                return this
            },
        remove:function(){
            if(f)for(var b=arguments,c=0,d=b.length;c<d;c++)for(var j=0;j<f.length&&!(b[c]===f[j]&&(h&&j<=s&&(s--,j<=o&&o--),f.splice(j--,1),e.unique));j++);
            return this
            },
        has:function(b){
            if(f)for(var c=
                0,e=f.length;c<e;c++)if(b===f[c])return!0;return!1
            },
        empty:function(){
            f=[];
            return this
            },
        disable:function(){
            f=d=j=c;
            return this
            },
        disabled:function(){
            return!f
            },
        lock:function(){
            d=c;
            (!j||!0===j)&&A.disable();
            return this
            },
        locked:function(){
            return!d
            },
        fireWith:function(b,c){
            d&&(h?e.once||d.push([b,c]):(!e.once||!j)&&x(b,c));
            return this
            },
        fire:function(){
            A.fireWith(this,arguments);
            return this
            },
        fired:function(){
            return!!g
            }
        };
    
return A
};

var D=[].slice;
k.extend({
    Deferred:function(b){
        var c=k.Callbacks("once memory"),
        e=k.Callbacks("once memory"),f=k.Callbacks("memory"),d="pending",j={
            resolve:c,
            reject:e,
            notify:f
        },g={
            done:c.add,
            fail:e.add,
            progress:f.add,
            state:function(){
                return d
                },
            isResolved:c.fired,
            isRejected:e.fired,
            then:function(b,c,e){
                h.done(b).fail(c).progress(e);
                return this
                },
            always:function(){
                h.done.apply(h,arguments).fail.apply(h,arguments);
                return this
                },
            pipe:function(b,c,e){
                return k.Deferred(function(f){
                    k.each({
                        done:[b,"resolve"],
                        fail:[c,"reject"],
                        progress:[e,"notify"]
                        },function(b,c){
                        var e=c[0],d=c[1],j;
                        if(k.isFunction(e))h[b](function(){
                            if((j=
                                e.apply(this,arguments))&&k.isFunction(j.promise))j.promise().then(f.resolve,f.reject,f.notify);else f[d+"With"](this===h?f:this,[j])
                                });else h[b](f[d])
                            })
                    }).promise()
                },
            promise:function(b){
                if(null==b)b=g;else for(var c in g)b[c]=g[c];return b
                }
            },h=g.promise({}),l;
    for(l in j)h[l]=j[l].fire,h[l+"With"]=j[l].fireWith;h.done(function(){
        d="resolved"
        },e.disable,f.lock).fail(function(){
        d="rejected"
        },c.disable,f.lock);
    b&&b.call(h,h);
    return h
    },
when:function(b){
    function c(b){
        return function(c){
            f[b]=1<arguments.length?
            D.call(arguments,0):c;
            --h||l.resolveWith(l,f)
            }
        }
    function e(b){
    return function(c){
        g[b]=1<arguments.length?D.call(arguments,0):c;
        l.notifyWith(s,g)
        }
    }
var f=D.call(arguments,0),d=0,j=f.length,g=Array(j),h=j,l=1>=j&&b&&k.isFunction(b.promise)?b:k.Deferred(),s=l.promise();
if(1<j){
    for(;d<j;d++)f[d]&&f[d].promise&&k.isFunction(f[d].promise)?f[d].promise().then(c(d),l.reject,e(d)):--h;
    h||l.resolveWith(l,f)
    }else l!==b&&l.resolveWith(l,j?[b]:[]);
return s
}
});
k.support=function(){
    var b,c,e,f,j,g,h,l,s=t.createElement("div");
    s.setAttribute("className","t");
    s.innerHTML="   <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>";
    c=s.getElementsByTagName("*");
    e=s.getElementsByTagName("a")[0];
    if(!c||!c.length||!e)return{};
        
    f=t.createElement("select");
    j=f.appendChild(t.createElement("option"));
    c=s.getElementsByTagName("input")[0];
    b={
        leadingWhitespace:3===s.firstChild.nodeType,
        tbody:!s.getElementsByTagName("tbody").length,
        htmlSerialize:!!s.getElementsByTagName("link").length,
        style:/top/.test(e.getAttribute("style")),
        hrefNormalized:"/a"===e.getAttribute("href"),
        opacity:/^0.55/.test(e.style.opacity),
        cssFloat:!!e.style.cssFloat,
        checkOn:"on"===c.value,
        optSelected:j.selected,
        getSetAttribute:"t"!==s.className,
        enctype:!!t.createElement("form").enctype,
        html5Clone:"<:nav></:nav>"!==t.createElement("nav").cloneNode(!0).outerHTML,
        submitBubbles:!0,
        changeBubbles:!0,
        focusinBubbles:!1,
        deleteExpando:!0,
        noCloneEvent:!0,
        inlineBlockNeedsLayout:!1,
        shrinkWrapBlocks:!1,
        reliableMarginRight:!0,
        pixelMargin:!0
        };
        
    k.boxModel=b.boxModel="CSS1Compat"===t.compatMode;
    c.checked=!0;
    b.noCloneChecked=c.cloneNode(!0).checked;
    f.disabled=!0;
    b.optDisabled=!j.disabled;
    try{
        delete s.test
        }catch(o){
        b.deleteExpando=!1
        }!s.addEventListener&&s.attachEvent&&s.fireEvent&&(s.attachEvent("onclick",function(){
        b.noCloneEvent=!1
        }),s.cloneNode(!0).fireEvent("onclick"));
    c=t.createElement("input");
    c.value="t";
    c.setAttribute("type","radio");
    b.radioValue="t"===c.value;
    c.setAttribute("checked","checked");
    c.setAttribute("name",
        "t");
    s.appendChild(c);
    e=t.createDocumentFragment();
    e.appendChild(s.lastChild);
    b.checkClone=e.cloneNode(!0).cloneNode(!0).lastChild.checked;
    b.appendChecked=c.checked;
    e.removeChild(c);
    e.appendChild(s);
    if(s.attachEvent)for(h in{
        submit:1,
        change:1,
        focusin:1
    })c="on"+h,l=c in s,l||(s.setAttribute(c,"return;"),l="function"===typeof s[c]),b[h+"Bubbles"]=l;e.removeChild(s);
    e=f=j=s=c=null;
    k(function(){
        var c,e,f,j,h=t.getElementsByTagName("body")[0];
        h&&(c=t.createElement("div"),c.style.cssText="padding:0;margin:0;border:0;visibility:hidden;width:0;height:0;position:static;top:0;margin-top:1px",
            h.insertBefore(c,h.firstChild),s=t.createElement("div"),c.appendChild(s),s.innerHTML="<table><tr><td style='padding:0;margin:0;border:0;display:none'></td><td>t</td></tr></table>",g=s.getElementsByTagName("td"),l=0===g[0].offsetHeight,g[0].style.display="",g[1].style.display="none",b.reliableHiddenOffsets=l&&0===g[0].offsetHeight,d.getComputedStyle&&(s.innerHTML="",e=t.createElement("div"),e.style.width="0",e.style.marginRight="0",s.style.width="2px",s.appendChild(e),b.reliableMarginRight=0===(parseInt((d.getComputedStyle(e,
                null)||{
                marginRight:0
            }).marginRight,10)||0)),"undefined"!==typeof s.style.zoom&&(s.innerHTML="",s.style.width=s.style.padding="1px",s.style.border=0,s.style.overflow="hidden",s.style.display="inline",s.style.zoom=1,b.inlineBlockNeedsLayout=3===s.offsetWidth,s.style.display="block",s.style.overflow="visible",s.innerHTML="<div style='width:5px;'></div>",b.shrinkWrapBlocks=3!==s.offsetWidth),s.style.cssText="position:absolute;top:0;left:0;width:1px;height:1px;padding:0;margin:0;border:0;visibility:hidden;",
            s.innerHTML="<div style='position:absolute;top:0;left:0;width:1px;height:1px;padding:0;margin:0;border:5px solid #000;display:block;'><div style='padding:0;margin:0;border:0;display:block;overflow:hidden;'></div></div><table style='position:absolute;top:0;left:0;width:1px;height:1px;padding:0;margin:0;border:5px solid #000;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>",e=s.firstChild,f=e.firstChild,j={
                doesNotAddBorder:5!==f.offsetTop,
                doesAddBorderForTableAndCells:5===e.nextSibling.firstChild.firstChild.offsetTop
                },
            f.style.position="fixed",f.style.top="20px",j.fixedPosition=20===f.offsetTop||15===f.offsetTop,f.style.position=f.style.top="",e.style.overflow="hidden",e.style.position="relative",j.subtractsBorderForOverflowNotVisible=-5===f.offsetTop,j.doesNotIncludeMarginInBodyOffset=1!==h.offsetTop,d.getComputedStyle&&(s.style.marginTop="1%",b.pixelMargin="1%"!==(d.getComputedStyle(s,null)||{
                marginTop:0
            }).marginTop),"undefined"!==typeof c.style.zoom&&(c.style.zoom=1),h.removeChild(c),s=null,k.extend(b,j))
        });
    return b
    }();
var F=/^(?:\{.*\}|\[.*\])$/,J=/([A-Z])/g;
k.extend({
    cache:{},
    uuid:0,
    expando:"jQuery"+(k.fn.jquery+Math.random()).replace(/\D/g,""),
    noData:{
        embed:!0,
        object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",
        applet:!0
        },
    hasData:function(b){
        b=b.nodeType?k.cache[b[k.expando]]:b[k.expando];
        return!!b&&!f(b)
        },
    data:function(b,e,f,d){
        if(k.acceptData(b)){
            var j;
            j=k.expando;
            var g="string"===typeof e,h=b.nodeType,l=h?k.cache:b,s=h?b[j]:b[j]&&j,o="events"===e;
            if(s&&l[s]&&(o||d||l[s].data)||!(g&&f===c)){
                s||
                (h?b[j]=s=++k.uuid:s=j);
                l[s]||(l[s]={},h||(l[s].toJSON=k.noop));
                if("object"===typeof e||"function"===typeof e)d?l[s]=k.extend(l[s],e):l[s].data=k.extend(l[s].data,e);
                j=b=l[s];
                d||(b.data||(b.data={}),b=b.data);
                f!==c&&(b[k.camelCase(e)]=f);
                if(o&&!b[e])return j.events;
                g?(f=b[e],null==f&&(f=b[k.camelCase(e)])):f=b;
                return f
                }
            }
    },
removeData:function(b,c,e){
    if(k.acceptData(b)){
        var d,j,g,h=k.expando,l=b.nodeType,s=l?k.cache:b,o=l?b[h]:h;
        if(s[o]){
            if(c&&(d=e?s[o]:s[o].data)){
                k.isArray(c)||(c in d?c=[c]:(c=k.camelCase(c),
                    c=c in d?[c]:c.split(" ")));
                for(j=0,g=c.length;j<g;j++)delete d[c[j]];
                if(!(e?f:k.isEmptyObject)(d))return
            }
            if(!e&&(delete s[o].data,!f(s[o])))return;
            k.support.deleteExpando||!s.setInterval?delete s[o]:s[o]=null;
            l&&(k.support.deleteExpando?delete b[h]:b.removeAttribute?b.removeAttribute(h):b[h]=null)
            }
        }
},
_data:function(b,c,e){
    return k.data(b,c,e,!0)
    },
acceptData:function(b){
    if(b.nodeName){
        var c=k.noData[b.nodeName.toLowerCase()];
        if(c)return!(!0===c||b.getAttribute("classid")!==c)
            }
            return!0
    }
});
k.fn.extend({
    data:function(b,
        f){
        var d,j,g,h,l,s=this[0],o=0,q=null;
        if(b===c){
            if(this.length&&(q=k.data(s),1===s.nodeType&&!k._data(s,"parsedAttrs"))){
                g=s.attributes;
                for(l=g.length;o<l;o++)h=g[o].name,0===h.indexOf("data-")&&(h=k.camelCase(h.substring(5)),e(s,h,q[h]));
                k._data(s,"parsedAttrs",!0)
                }
                return q
            }
            if("object"===typeof b)return this.each(function(){
            k.data(this,b)
            });
        d=b.split(".",2);
        d[1]=d[1]?"."+d[1]:"";
        j=d[1]+"!";
        return k.access(this,function(f){
            if(f===c)return q=this.triggerHandler("getData"+j,[d[0]]),q===c&&s&&(q=k.data(s,
                b),q=e(s,b,q)),q===c&&d[1]?this.data(d[0]):q;
            d[1]=f;
            this.each(function(){
                var c=k(this);
                c.triggerHandler("setData"+j,d);
                k.data(this,b,f);
                c.triggerHandler("changeData"+j,d)
                })
            },null,f,1<arguments.length,null,!1)
        },
    removeData:function(b){
        return this.each(function(){
            k.removeData(this,b)
            })
        }
    });
k.extend({
    _mark:function(b,c){
        b&&(c=(c||"fx")+"mark",k._data(b,c,(k._data(b,c)||0)+1))
        },
    _unmark:function(b,c,e){
        !0!==b&&(e=c,c=b,b=!1);
        if(c){
            var e=e||"fx",f=e+"mark";
            (b=b?0:(k._data(c,f)||1)-1)?k._data(c,f,b):(k.removeData(c,
                f,!0),g(c,e,"mark"))
            }
        },
queue:function(b,c,e){
    var f;
    if(b)return c=(c||"fx")+"queue",f=k._data(b,c),e&&(!f||k.isArray(e)?f=k._data(b,c,k.makeArray(e)):f.push(e)),f||[]
        },
dequeue:function(b,c){
    var c=c||"fx",e=k.queue(b,c),f=e.shift(),d={};
    
    "inprogress"===f&&(f=e.shift());
    f&&("fx"===c&&e.unshift("inprogress"),k._data(b,c+".run",d),f.call(b,function(){
        k.dequeue(b,c)
        },d));
    e.length||(k.removeData(b,c+"queue "+c+".run",!0),g(b,c,"queue"))
    }
});
k.fn.extend({
    queue:function(b,e){
        var f=2;
        "string"!==typeof b&&(e=
            b,b="fx",f--);
        return arguments.length<f?k.queue(this[0],b):e===c?this:this.each(function(){
            var c=k.queue(this,b,e);
            "fx"===b&&"inprogress"!==c[0]&&k.dequeue(this,b)
            })
        },
    dequeue:function(b){
        return this.each(function(){
            k.dequeue(this,b)
            })
        },
    delay:function(b,c){
        b=k.fx?k.fx.speeds[b]||b:b;
        return this.queue(c||"fx",function(c,e){
            var f=setTimeout(c,b);
            e.stop=function(){
                clearTimeout(f)
                }
            })
    },
clearQueue:function(b){
    return this.queue(b||"fx",[])
    },
promise:function(b,e){
    function f(){
        --h||d.resolveWith(j,[j])
        }
        "string"!==
    typeof b&&(e=b,b=c);
    for(var b=b||"fx",d=k.Deferred(),j=this,g=j.length,h=1,l=b+"defer",s=b+"queue",o=b+"mark",q;g--;)if(q=k.data(j[g],l,c,!0)||(k.data(j[g],s,c,!0)||k.data(j[g],o,c,!0))&&k.data(j[g],l,k.Callbacks("once memory"),!0))h++,q.add(f);f();
    return d.promise(e)
    }
});
var E=/[\n\t\r]/g,K=/\s+/,Q=/\r/g,ca=/^(?:button|input)$/i,V=/^(?:button|input|object|select|textarea)$/i,sa=/^a(?:rea)?$/i,ub=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,
O=k.support.getSetAttribute,N,R,T;
k.fn.extend({
    attr:function(b,c){
        return k.access(this,k.attr,b,c,1<arguments.length)
        },
    removeAttr:function(b){
        return this.each(function(){
            k.removeAttr(this,b)
            })
        },
    prop:function(b,c){
        return k.access(this,k.prop,b,c,1<arguments.length)
        },
    removeProp:function(b){
        b=k.propFix[b]||b;
        return this.each(function(){
            try{
                this[b]=c,delete this[b]
            }catch(e){}
        })
    },
addClass:function(b){
    var c,e,f,d,j,g,h;
    if(k.isFunction(b))return this.each(function(c){
        k(this).addClass(b.call(this,c,this.className))
        });
    if(b&&"string"===typeof b){
        c=b.split(K);
        for(e=0,f=this.length;e<f;e++)if(d=this[e],1===d.nodeType)if(!d.className&&1===c.length)d.className=b;
            else{
            j=" "+d.className+" ";
            for(g=0,h=c.length;g<h;g++)~j.indexOf(" "+c[g]+" ")||(j+=c[g]+" ");
            d.className=k.trim(j)
            }
        }
        return this
},
removeClass:function(b){
    var e,f,d,j,g,h,l;
    if(k.isFunction(b))return this.each(function(c){
        k(this).removeClass(b.call(this,c,this.className))
        });
    if(b&&"string"===typeof b||b===c){
        e=(b||"").split(K);
        for(f=0,d=this.length;f<d;f++)if(j=
            this[f],1===j.nodeType&&j.className)if(b){
            g=(" "+j.className+" ").replace(E," ");
            for(h=0,l=e.length;h<l;h++)g=g.replace(" "+e[h]+" "," ");
            j.className=k.trim(g)
            }else j.className=""
            }
            return this
    },
toggleClass:function(b,c){
    var e=typeof b,f="boolean"===typeof c;
    return k.isFunction(b)?this.each(function(e){
        k(this).toggleClass(b.call(this,e,this.className,c),c)
        }):this.each(function(){
        if("string"===e)for(var d,j=0,g=k(this),h=c,l=b.split(K);d=l[j++];)h=f?h:!g.hasClass(d),g[h?"addClass":"removeClass"](d);
        else if("undefined"===e||"boolean"===e)this.className&&k._data(this,"__className__",this.className),this.className=this.className||!1===b?"":k._data(this,"__className__")||""
            })
    },
hasClass:function(b){
    for(var b=" "+b+" ",c=0,e=this.length;c<e;c++)if(1===this[c].nodeType&&-1<(" "+this[c].className+" ").replace(E," ").indexOf(b))return!0;return!1
    },
val:function(b){
    var e,f,d,j=this[0];
    if(arguments.length)return d=k.isFunction(b),this.each(function(f){
        var j=k(this);
        if(1===this.nodeType&&(f=d?b.call(this,
            f,j.val()):b,null==f?f="":"number"===typeof f?f+="":k.isArray(f)&&(f=k.map(f,function(b){
            return null==b?"":b+""
            })),e=k.valHooks[this.type]||k.valHooks[this.nodeName.toLowerCase()],!e||!("set"in e)||e.set(this,f,"value")===c))this.value=f
            });
    if(j){
        if((e=k.valHooks[j.type]||k.valHooks[j.nodeName.toLowerCase()])&&"get"in e&&(f=e.get(j,"value"))!==c)return f;
        f=j.value;
        return"string"===typeof f?f.replace(Q,""):null==f?"":f
        }
    }
});
k.extend({
    valHooks:{
        option:{
            get:function(b){
                var c=b.attributes.value;
                return!c||
                c.specified?b.value:b.text
                }
            },
    select:{
        get:function(b){
            var c,e,f=b.selectedIndex,d=[],j=b.options,g="select-one"===b.type;
            if(0>f)return null;
            b=g?f:0;
            for(e=g?f+1:j.length;b<e;b++)if(c=j[b],c.selected&&(k.support.optDisabled?!c.disabled:null===c.getAttribute("disabled"))&&(!c.parentNode.disabled||!k.nodeName(c.parentNode,"optgroup"))){
                c=k(c).val();
                if(g)return c;
                d.push(c)
                }
                return g&&!d.length&&j.length?k(j[f]).val():d
            },
        set:function(b,c){
            var e=k.makeArray(c);
            k(b).find("option").each(function(){
                this.selected=
                0<=k.inArray(k(this).val(),e)
                });
            e.length||(b.selectedIndex=-1);
            return e
            }
        }
},
attrFn:{
    val:!0,
    css:!0,
    html:!0,
    text:!0,
    data:!0,
    width:!0,
    height:!0,
    offset:!0
    },
attr:function(b,e,f,d){
    var j,g,h=b.nodeType;
    if(b&&!(3===h||8===h||2===h)){
        if(d&&e in k.attrFn)return k(b)[e](f);
        if("undefined"===typeof b.getAttribute)return k.prop(b,e,f);
        if(d=1!==h||!k.isXMLDoc(b))e=e.toLowerCase(),g=k.attrHooks[e]||(ub.test(e)?R:N);
        if(f!==c)if(null===f)k.removeAttr(b,e);
            else{
            if(g&&"set"in g&&d&&(j=g.set(b,f,e))!==c)return j;
            b.setAttribute(e,
                ""+f);
            return f
            }else{
            if(g&&"get"in g&&d&&null!==(j=g.get(b,e)))return j;
            j=b.getAttribute(e);
            return null===j?c:j
            }
        }
},
removeAttr:function(b,c){
    var e,f,d,j,g,h=0;
    if(c&&1===b.nodeType){
        f=c.toLowerCase().split(K);
        for(j=f.length;h<j;h++)if(d=f[h])e=k.propFix[d]||d,(g=ub.test(d))||k.attr(b,d,""),b.removeAttribute(O?d:e),g&&e in b&&(b[e]=!1)
            }
        },
attrHooks:{
    type:{
        set:function(b,c){
            if(ca.test(b.nodeName)&&b.parentNode)k.error("type property can't be changed");
            else if(!k.support.radioValue&&"radio"===c&&k.nodeName(b,
                "input")){
                var e=b.value;
                b.setAttribute("type",c);
                e&&(b.value=e);
                return c
                }
            }
    },
value:{
    get:function(b,c){
        return N&&k.nodeName(b,"button")?N.get(b,c):c in b?b.value:null
        },
    set:function(b,c,e){
        if(N&&k.nodeName(b,"button"))return N.set(b,c,e);
        b.value=c
        }
    }
},
propFix:{
    tabindex:"tabIndex",
    readonly:"readOnly",
    "for":"htmlFor",
    "class":"className",
    maxlength:"maxLength",
    cellspacing:"cellSpacing",
    cellpadding:"cellPadding",
    rowspan:"rowSpan",
    colspan:"colSpan",
    usemap:"useMap",
    frameborder:"frameBorder",
    contenteditable:"contentEditable"
},
prop:function(b,e,f){
    var d,j,g=b.nodeType;
    if(b&&!(3===g||8===g||2===g)){
        if(1!==g||!k.isXMLDoc(b))e=k.propFix[e]||e,j=k.propHooks[e];
        return f!==c?j&&"set"in j&&(d=j.set(b,f,e))!==c?d:b[e]=f:j&&"get"in j&&null!==(d=j.get(b,e))?d:b[e]
        }
    },
propHooks:{
    tabIndex:{
        get:function(b){
            var e=b.getAttributeNode("tabindex");
            return e&&e.specified?parseInt(e.value,10):V.test(b.nodeName)||sa.test(b.nodeName)&&b.href?0:c
            }
        }
}
});
k.attrHooks.tabindex=k.propHooks.tabIndex;
R={
    get:function(b,e){
        var f,d=k.prop(b,e);
        return!0===
        d||"boolean"!==typeof d&&(f=b.getAttributeNode(e))&&!1!==f.nodeValue?e.toLowerCase():c
        },
    set:function(b,c,e){
        !1===c?k.removeAttr(b,e):(c=k.propFix[e]||e,c in b&&(b[c]=!0),b.setAttribute(e,e.toLowerCase()));
        return e
        }
    };

O||(T={
    name:!0,
    id:!0,
    coords:!0
    },N=k.valHooks.button={
    get:function(b,e){
        var f;
        return(f=b.getAttributeNode(e))&&(T[e]?""!==f.nodeValue:f.specified)?f.nodeValue:c
        },
    set:function(b,c,e){
        var f=b.getAttributeNode(e);
        f||(f=t.createAttribute(e),b.setAttributeNode(f));
        return f.nodeValue=c+""
        }
    },
k.attrHooks.tabindex.set=N.set,k.each(["width","height"],function(b,c){
    k.attrHooks[c]=k.extend(k.attrHooks[c],{
        set:function(b,e){
            if(""===e)return b.setAttribute(c,"auto"),e
                }
            })
}),k.attrHooks.contenteditable={
    get:N.get,
    set:function(b,c,e){
        ""===c&&(c="false");
        N.set(b,c,e)
        }
    });
k.support.hrefNormalized||k.each(["href","src","width","height"],function(b,e){
    k.attrHooks[e]=k.extend(k.attrHooks[e],{
        get:function(b){
            b=b.getAttribute(e,2);
            return null===b?c:b
            }
        })
});
k.support.style||(k.attrHooks.style={
    get:function(b){
        return b.style.cssText.toLowerCase()||
        c
        },
    set:function(b,c){
        return b.style.cssText=""+c
        }
    });
k.support.optSelected||(k.propHooks.selected=k.extend(k.propHooks.selected,{
    get:function(b){
        if(b=b.parentNode)b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex;
        return null
        }
    }));
k.support.enctype||(k.propFix.enctype="encoding");
k.support.checkOn||k.each(["radio","checkbox"],function(){
    k.valHooks[this]={
        get:function(b){
            return null===b.getAttribute("value")?"on":b.value
            }
        }
});
k.each(["radio","checkbox"],function(){
    k.valHooks[this]=k.extend(k.valHooks[this],

    {
        set:function(b,c){
            if(k.isArray(c))return b.checked=0<=k.inArray(k(b).val(),c)
                }
            })
});
var S=/^(?:textarea|input|select)$/i,U=/^([^\.]*)?(?:\.(.+))?$/,W=/(?:^|\s)hover(\.\S+)?\b/,X=/^key/,Y=/^(?:mouse|contextmenu)|click/,Z=/^(?:focusinfocus|focusoutblur)$/,aa=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,ba=function(b){
    if(b=aa.exec(b))b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)");
    return b
    },da=function(b){
    return k.event.special.hover?b:b.replace(W,"mouseenter$1 mouseleave$1")
    };
k.event={
    add:function(b,e,f,d,j){
        var g,h,l,s,o,q,x,A,B;
        if(!(3===b.nodeType||8===b.nodeType||!e||!f||!(g=k._data(b)))){
            f.handler&&(x=f,f=x.handler,j=x.selector);
            f.guid||(f.guid=k.guid++);
            l=g.events;
            l||(g.events=l={});
            h=g.handle;
            h||(g.handle=h=function(b){
                return"undefined"!==typeof k&&(!b||k.event.triggered!==b.type)?k.event.dispatch.apply(h.elem,arguments):c
                },h.elem=b);
            e=k.trim(da(e)).split(" ");
            for(g=0;g<e.length;g++){
                s=U.exec(e[g])||[];
                o=s[1];
                q=(s[2]||"").split(".").sort();
                B=k.event.special[o]||

                {};
                
                o=(j?B.delegateType:B.bindType)||o;
                B=k.event.special[o]||{};
                
                s=k.extend({
                    type:o,
                    origType:s[1],
                    data:d,
                    handler:f,
                    guid:f.guid,
                    selector:j,
                    quick:j&&ba(j),
                    namespace:q.join(".")
                    },x);
                A=l[o];
                if(!A&&(A=l[o]=[],A.delegateCount=0,!B.setup||!1===B.setup.call(b,d,q,h)))b.addEventListener?b.addEventListener(o,h,!1):b.attachEvent&&b.attachEvent("on"+o,h);
                B.add&&(B.add.call(b,s),s.handler.guid||(s.handler.guid=f.guid));
                j?A.splice(A.delegateCount++,0,s):A.push(s);
                k.event.global[o]=!0
                }
                b=null
            }
        },
global:{},
remove:function(b,
    c,e,f,d){
    var j=k.hasData(b)&&k._data(b),g,h,l,s,o,q,x,A,B,i;
    if(j&&(x=j.events)){
        c=k.trim(da(c||"")).split(" ");
        for(g=0;g<c.length;g++)if(h=U.exec(c[g])||[],l=s=h[1],h=h[2],l){
            A=k.event.special[l]||{};
            
            l=(f?A.delegateType:A.bindType)||l;
            B=x[l]||[];
            o=B.length;
            h=h?RegExp("(^|\\.)"+h.split(".").sort().join("\\.(?:.*\\.)?")+"(\\.|$)"):null;
            for(q=0;q<B.length;q++)if(i=B[q],(d||s===i.origType)&&(!e||e.guid===i.guid)&&(!h||h.test(i.namespace))&&(!f||f===i.selector||"**"===f&&i.selector))B.splice(q--,1),i.selector&&
                B.delegateCount--,A.remove&&A.remove.call(b,i);0===B.length&&o!==B.length&&((!A.teardown||!1===A.teardown.call(b,h))&&k.removeEvent(b,l,j.handle),delete x[l])
            }else for(l in x)k.event.remove(b,l+c[g],e,f,!0);if(k.isEmptyObject(x)){
            if(c=j.handle)c.elem=null;
            k.removeData(b,["events","handle"],!0)
            }
        }
},
customEvent:{
    getData:!0,
    setData:!0,
    changeData:!0
    },
trigger:function(b,e,f,j){
    if(!f||!(3===f.nodeType||8===f.nodeType)){
        var g=b.type||b,h=[],l,s,o,q,x;
        if(!Z.test(g+k.event.triggered)&&(0<=g.indexOf("!")&&(g=
            g.slice(0,-1),l=!0),0<=g.indexOf(".")&&(h=g.split("."),g=h.shift(),h.sort()),f&&!k.event.customEvent[g]||k.event.global[g]))if(b="object"===typeof b?b[k.expando]?b:new k.Event(g,b):new k.Event(g),b.type=g,b.isTrigger=!0,b.exclusive=l,b.namespace=h.join("."),b.namespace_re=b.namespace?RegExp("(^|\\.)"+h.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,l=0>g.indexOf(":")?"on"+g:"",f){
            if(b.result=c,b.target||(b.target=f),e=null!=e?k.makeArray(e):[],e.unshift(b),o=k.event.special[g]||{},!(o.trigger&&!1===o.trigger.apply(f,
                e))){
                x=[[f,o.bindType||g]];
                if(!j&&!o.noBubble&&!k.isWindow(f)){
                    q=o.delegateType||g;
                    h=Z.test(q+g)?f:f.parentNode;
                    for(s=null;h;h=h.parentNode)x.push([h,q]),s=h;
                    s&&s===f.ownerDocument&&x.push([s.defaultView||s.parentWindow||d,q])
                    }
                    for(s=0;s<x.length&&!b.isPropagationStopped();s++)h=x[s][0],b.type=x[s][1],(q=(k._data(h,"events")||{})[b.type]&&k._data(h,"handle"))&&q.apply(h,e),(q=l&&h[l])&&k.acceptData(h)&&!1===q.apply(h,e)&&b.preventDefault();
                b.type=g;
                if(!j&&!b.isDefaultPrevented()&&(!o._default||!1===
                    o._default.apply(f.ownerDocument,e))&&!("click"===g&&k.nodeName(f,"a"))&&k.acceptData(f))if(l&&f[g]&&("focus"!==g&&"blur"!==g||0!==b.target.offsetWidth)&&!k.isWindow(f))(s=f[l])&&(f[l]=null),k.event.triggered=g,f[g](),k.event.triggered=c,s&&(f[l]=s);
                return b.result
                }
            }else for(s in f=k.cache,f)f[s].events&&f[s].events[g]&&k.event.trigger(b,e,f[s].handle.elem,!0)
            }
        },
dispatch:function(b){
    var b=k.event.fix(b||d.event),e=(k._data(this,"events")||{})[b.type]||[],f=e.delegateCount,j=[].slice.call(arguments,
        0),g=!b.exclusive&&!b.namespace,h=k.event.special[b.type]||{},l=[],s,o,q,x,A,B,i;
    j[0]=b;
    b.delegateTarget=this;
    if(!(h.preDispatch&&!1===h.preDispatch.call(this,b))){
        if(f&&!(b.button&&"click"===b.type)){
            q=k(this);
            q.context=this.ownerDocument||this;
            for(o=b.target;o!=this;o=o.parentNode||this)if(!0!==o.disabled){
                A={};
                
                B=[];
                q[0]=o;
                for(s=0;s<f;s++){
                    x=e[s];
                    i=x.selector;
                    if(A[i]===c){
                        var H=A,I=i,G;
                        if(x.quick){
                            G=x.quick;
                            var w=o.attributes||{};
                            
                            G=(!G[1]||o.nodeName.toLowerCase()===G[1])&&(!G[2]||(w.id||{}).value===
                                G[2])&&(!G[3]||G[3].test((w["class"]||{}).value))
                            }else G=q.is(i);
                        H[I]=G
                        }
                        A[i]&&B.push(x)
                    }
                    B.length&&l.push({
                    elem:o,
                    matches:B
                })
                }
            }
            e.length>f&&l.push({
        elem:this,
        matches:e.slice(f)
        });
    for(s=0;s<l.length&&!b.isPropagationStopped();s++){
        f=l[s];
        b.currentTarget=f.elem;
        for(e=0;e<f.matches.length&&!b.isImmediatePropagationStopped();e++)if(x=f.matches[e],g||!b.namespace&&!x.namespace||b.namespace_re&&b.namespace_re.test(x.namespace))b.data=x.data,b.handleObj=x,x=((k.event.special[x.origType]||{}).handle||x.handler).apply(f.elem,
            j),x!==c&&(b.result=x,!1===x&&(b.preventDefault(),b.stopPropagation()))
            }
            h.postDispatch&&h.postDispatch.call(this,b);
    return b.result
    }
},
props:"attrChange,attrName,relatedNode,srcElement,altKey,bubbles,cancelable,ctrlKey,currentTarget,eventPhase,metaKey,relatedTarget,shiftKey,target,timeStamp,view,which".split(","),
fixHooks:{},
keyHooks:{
    props:["char","charCode","key","keyCode"],
    filter:function(b,c){
        null==b.which&&(b.which=null!=c.charCode?c.charCode:c.keyCode);
        return b
        }
    },
mouseHooks:{
    props:"button,buttons,clientX,clientY,fromElement,offsetX,offsetY,pageX,pageY,screenX,screenY,toElement".split(","),
    filter:function(b,e){
        var f,d,j=e.button,g=e.fromElement;
        null==b.pageX&&null!=e.clientX&&(f=b.target.ownerDocument||t,d=f.documentElement,f=f.body,b.pageX=e.clientX+(d&&d.scrollLeft||f&&f.scrollLeft||0)-(d&&d.clientLeft||f&&f.clientLeft||0),b.pageY=e.clientY+(d&&d.scrollTop||f&&f.scrollTop||0)-(d&&d.clientTop||f&&f.clientTop||0));
        !b.relatedTarget&&g&&(b.relatedTarget=g===b.target?e.toElement:g);
        !b.which&&j!==c&&(b.which=j&1?1:j&2?3:j&4?2:0);
        return b
        }
    },
fix:function(b){
    if(b[k.expando])return b;
    var e,
    f,d=b,j=k.event.fixHooks[b.type]||{},g=j.props?this.props.concat(j.props):this.props,b=k.Event(d);
    for(e=g.length;e;)f=g[--e],b[f]=d[f];
    b.target||(b.target=d.srcElement||t);
    3===b.target.nodeType&&(b.target=b.target.parentNode);
    b.metaKey===c&&(b.metaKey=b.ctrlKey);
    return j.filter?j.filter(b,d):b
    },
special:{
    ready:{
        setup:k.bindReady
        },
    load:{
        noBubble:!0
        },
    focus:{
        delegateType:"focusin"
    },
    blur:{
        delegateType:"focusout"
    },
    beforeunload:{
        setup:function(b,c,e){
            k.isWindow(this)&&(this.onbeforeunload=e)
            },
        teardown:function(b,
            c){
            this.onbeforeunload===c&&(this.onbeforeunload=null)
            }
        }
},
simulate:function(b,c,e,f){
    b=k.extend(new k.Event,e,{
        type:b,
        isSimulated:!0,
        originalEvent:{}
    });
f?k.event.trigger(b,null,c):k.event.dispatch.call(c,b);
b.isDefaultPrevented()&&e.preventDefault()
}
};

k.event.handle=k.event.dispatch;
k.removeEvent=t.removeEventListener?function(b,c,e){
    b.removeEventListener&&b.removeEventListener(c,e,!1)
    }:function(b,c,e){
    b.detachEvent&&b.detachEvent("on"+c,e)
    };
    
k.Event=function(b,c){
    if(!(this instanceof k.Event))return new k.Event(b,
        c);
    b&&b.type?(this.originalEvent=b,this.type=b.type,this.isDefaultPrevented=b.defaultPrevented||!1===b.returnValue||b.getPreventDefault&&b.getPreventDefault()?j:h):this.type=b;
    c&&k.extend(this,c);
    this.timeStamp=b&&b.timeStamp||k.now();
    this[k.expando]=!0
    };
    
k.Event.prototype={
    preventDefault:function(){
        this.isDefaultPrevented=j;
        var b=this.originalEvent;
        b&&(b.preventDefault?b.preventDefault():b.returnValue=!1)
        },
    stopPropagation:function(){
        this.isPropagationStopped=j;
        var b=this.originalEvent;
        b&&(b.stopPropagation&&
            b.stopPropagation(),b.cancelBubble=!0)
        },
    stopImmediatePropagation:function(){
        this.isImmediatePropagationStopped=j;
        this.stopPropagation()
        },
    isDefaultPrevented:h,
    isPropagationStopped:h,
    isImmediatePropagationStopped:h
};

k.each({
    mouseenter:"mouseover",
    mouseleave:"mouseout"
},function(b,c){
    k.event.special[b]={
        delegateType:c,
        bindType:c,
        handle:function(b){
            var e=b.relatedTarget,f=b.handleObj,d;
            if(!e||e!==this&&!k.contains(this,e))b.type=f.origType,d=f.handler.apply(this,arguments),b.type=c;
            return d
            }
        }
});
k.support.submitBubbles||
(k.event.special.submit={
    setup:function(){
        if(k.nodeName(this,"form"))return!1;
        k.event.add(this,"click._submit keypress._submit",function(b){
            b=b.target;
            if((b=k.nodeName(b,"input")||k.nodeName(b,"button")?b.form:c)&&!b._submit_attached)k.event.add(b,"submit._submit",function(b){
                b._submit_bubble=!0
                }),b._submit_attached=!0
            })
        },
    postDispatch:function(b){
        b._submit_bubble&&(delete b._submit_bubble,this.parentNode&&!b.isTrigger&&k.event.simulate("submit",this.parentNode,b,!0))
        },
    teardown:function(){
        if(k.nodeName(this,
            "form"))return!1;
        k.event.remove(this,"._submit")
        }
    });
k.support.changeBubbles||(k.event.special.change={
    setup:function(){
        if(S.test(this.nodeName)){
            if("checkbox"===this.type||"radio"===this.type)k.event.add(this,"propertychange._change",function(b){
                "checked"===b.originalEvent.propertyName&&(this._just_changed=!0)
                }),k.event.add(this,"click._change",function(b){
                this._just_changed&&!b.isTrigger&&(this._just_changed=!1,k.event.simulate("change",this,b,!0))
                });
            return!1
            }
            k.event.add(this,"beforeactivate._change",
            function(b){
                b=b.target;
                S.test(b.nodeName)&&!b._change_attached&&(k.event.add(b,"change._change",function(b){
                    this.parentNode&&!b.isSimulated&&!b.isTrigger&&k.event.simulate("change",this.parentNode,b,!0)
                    }),b._change_attached=!0)
                })
        },
    handle:function(b){
        var c=b.target;
        if(this!==c||b.isSimulated||b.isTrigger||"radio"!==c.type&&"checkbox"!==c.type)return b.handleObj.handler.apply(this,arguments)
            },
    teardown:function(){
        k.event.remove(this,"._change");
        return S.test(this.nodeName)
        }
    });
k.support.focusinBubbles||
k.each({
    focus:"focusin",
    blur:"focusout"
},function(b,c){
    var e=0,f=function(b){
        k.event.simulate(c,b.target,k.event.fix(b),!0)
        };
        
    k.event.special[c]={
        setup:function(){
            0===e++&&t.addEventListener(b,f,!0)
            },
        teardown:function(){
            0===--e&&t.removeEventListener(b,f,!0)
            }
        }
});
k.fn.extend({
    on:function(b,e,f,d,j){
        var g,l;
        if("object"===typeof b){
            "string"!==typeof e&&(f=f||e,e=c);
            for(l in b)this.on(l,e,f,b[l],j);return this
            }
            null==f&&null==d?(d=e,f=e=c):null==d&&("string"===typeof e?(d=f,f=c):(d=f,f=e,e=c));
        if(!1===
            d)d=h;
        else if(!d)return this;
        1===j&&(g=d,d=function(b){
            k().off(b);
            return g.apply(this,arguments)
            },d.guid=g.guid||(g.guid=k.guid++));
        return this.each(function(){
            k.event.add(this,b,d,f,e)
            })
        },
    one:function(b,c,e,f){
        return this.on(b,c,e,f,1)
        },
    off:function(b,e,f){
        if(b&&b.preventDefault&&b.handleObj){
            var d=b.handleObj;
            k(b.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler);
            return this
            }
            if("object"===typeof b){
            for(d in b)this.off(d,e,b[d]);return this
            }
            if(!1===e||"function"===
            typeof e)f=e,e=c;
        !1===f&&(f=h);
        return this.each(function(){
            k.event.remove(this,b,f,e)
            })
        },
    bind:function(b,c,e){
        return this.on(b,null,c,e)
        },
    unbind:function(b,c){
        return this.off(b,null,c)
        },
    live:function(b,c,e){
        k(this.context).on(b,this.selector,c,e);
        return this
        },
    die:function(b,c){
        k(this.context).off(b,this.selector||"**",c);
        return this
        },
    delegate:function(b,c,e,f){
        return this.on(c,b,e,f)
        },
    undelegate:function(b,c,e){
        return 1==arguments.length?this.off(b,"**"):this.off(c,b,e)
        },
    trigger:function(b,c){
        return this.each(function(){
            k.event.trigger(b,
                c,this)
            })
        },
    triggerHandler:function(b,c){
        if(this[0])return k.event.trigger(b,c,this[0],!0)
            },
    toggle:function(b){
        var c=arguments,e=b.guid||k.guid++,f=0,d=function(e){
            var d=(k._data(this,"lastToggle"+b.guid)||0)%f;
            k._data(this,"lastToggle"+b.guid,d+1);
            e.preventDefault();
            return c[d].apply(this,arguments)||!1
            };
            
        for(d.guid=e;f<c.length;)c[f++].guid=e;
        return this.click(d)
        },
    hover:function(b,c){
        return this.mouseenter(b).mouseleave(c||b)
        }
    });
k.each("blur,focus,focusin,focusout,load,resize,scroll,unload,click,dblclick,mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave,change,select,submit,keydown,keypress,keyup,error,contextmenu".split(","),
    function(b,c){
        k.fn[c]=function(b,e){
            null==e&&(e=b,b=null);
            return 0<arguments.length?this.on(c,null,b,e):this.trigger(c)
            };
            
        k.attrFn&&(k.attrFn[c]=!0);
        X.test(c)&&(k.event.fixHooks[c]=k.event.keyHooks);
        Y.test(c)&&(k.event.fixHooks[c]=k.event.mouseHooks)
        });
(function(){
    function b(c,e,f,j,g,h){
        for(var g=0,l=j.length;g<l;g++){
            var s=j[g];
            if(s){
                for(var o=!1,s=s[c];s;){
                    if(s[d]===f){
                        o=j[s.sizset];
                        break
                    }
                    1===s.nodeType&&!h&&(s[d]=f,s.sizset=g);
                    if(s.nodeName.toLowerCase()===e){
                        o=s;
                        break
                    }
                    s=s[c]
                    }
                    j[g]=o
                }
            }
        }
    function e(b,
    c,f,j,g,h){
    for(var g=0,l=j.length;g<l;g++){
        var s=j[g];
        if(s){
            for(var o=!1,s=s[b];s;){
                if(s[d]===f){
                    o=j[s.sizset];
                    break
                }
                if(1===s.nodeType)if(h||(s[d]=f,s.sizset=g),"string"!==typeof c){
                    if(s===c){
                        o=!0;
                        break
                    }
                }else if(0<x.filter(c,[s]).length){
                    o=s;
                    break
                }
                s=s[b]
            }
            j[g]=o
        }
    }
}
var f=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),j=0,g=Object.prototype.toString,h=!1,l=!0,s=/\\/g,
o=/\r\n/g,q=/\W/;
[0,0].sort(function(){
    l=!1;
    return 0
    });
var x=function(b,c,e,d){
    var e=e||[],j=c=c||t;
    if(1!==c.nodeType&&9!==c.nodeType)return[];
    if(!b||"string"!==typeof b)return e;
    var h,l,s,o,q,k=!0,A=x.isXML(c),H=[],G=b;
    do if(f.exec(""),h=f.exec(G))if(G=h[3],H.push(h[1]),h[2]){
        o=h[3];
        break
    }while(h);
    if(1<H.length&&i.exec(b))if(2===H.length&&B.relative[H[0]])l=K(H[0]+H[1],c,d);else for(l=B.relative[H[0]]?[c]:x(H.shift(),c);H.length;)b=H.shift(),B.relative[b]&&(b+=H.shift()),l=K(b,l,d);
    else if(!d&&1<
        H.length&&9===c.nodeType&&!A&&B.match.ID.test(H[0])&&!B.match.ID.test(H[H.length-1])&&(h=x.find(H.shift(),c,A),c=h.expr?x.filter(h.expr,h.set)[0]:h.set[0]),c){
        h=d?{
            expr:H.pop(),
            set:I(d)
            }:x.find(H.pop(),1===H.length&&("~"===H[0]||"+"===H[0])&&c.parentNode?c.parentNode:c,A);
        l=h.expr?x.filter(h.expr,h.set):h.set;
        for(0<H.length?s=I(l):k=!1;H.length;)h=q=H.pop(),B.relative[q]?h=H.pop():q="",null==h&&(h=c),B.relative[q](s,h,A)
            }else s=[];
    s||(s=l);
    s||x.error(q||b);
    if("[object Array]"===g.call(s))if(k)if(c&&
        1===c.nodeType)for(b=0;null!=s[b];b++)s[b]&&(!0===s[b]||1===s[b].nodeType&&x.contains(c,s[b]))&&e.push(l[b]);else for(b=0;null!=s[b];b++)s[b]&&1===s[b].nodeType&&e.push(l[b]);else e.push.apply(e,s);else I(s,e);
    o&&(x(o,j,e,d),x.uniqueSort(e));
    return e
    };
    
x.uniqueSort=function(b){
    if(L&&(h=l,b.sort(L),h))for(var c=1;c<b.length;c++)b[c]===b[c-1]&&b.splice(c--,1);
    return b
    };
    
x.matches=function(b,c){
    return x(b,null,null,c)
    };
    
x.matchesSelector=function(b,c){
    return 0<x(c,null,null,[b]).length
    };
    
x.find=function(b,
    c,e){
    var f,d,j,g,h,l;
    if(!b)return[];
    for(d=0,j=B.order.length;d<j;d++)if(h=B.order[d],g=B.leftMatch[h].exec(b))if(l=g[1],g.splice(1,1),"\\"!==l.substr(l.length-1)&&(g[1]=(g[1]||"").replace(s,""),f=B.find[h](g,c,e),null!=f)){
        b=b.replace(B.match[h],"");
        break
    }
    f||(f="undefined"!==typeof c.getElementsByTagName?c.getElementsByTagName("*"):[]);
    return{
        set:f,
        expr:b
    }
};

x.filter=function(b,e,f,d){
    for(var j,g,h,l,s,o,q,k,A=b,i=[],H=e,G=e&&e[0]&&x.isXML(e[0]);b&&e.length;){
        for(h in B.filter)if(null!=(j=B.leftMatch[h].exec(b))&&
            j[2])if(o=B.filter[h],s=j[1],g=!1,j.splice(1,1),"\\"!==s.substr(s.length-1)){
            H===i&&(i=[]);
            if(B.preFilter[h])if(j=B.preFilter[h](j,H,f,i,d,G)){
                if(!0===j)continue
            }else g=l=!0;
            if(j)for(q=0;null!=(s=H[q]);q++)s&&(l=o(s,j,q,H),k=d^l,f&&null!=l?k?g=!0:H[q]=!1:k&&(i.push(s),g=!0));
            if(l!==c){
                f||(H=i);
                b=b.replace(B.match[h],"");
                if(!g)return[];
                break
            }
        }
        if(b===A)if(null==g)x.error(b);else break;
        A=b
        }
        return H
};

x.error=function(b){
    throw Error("Syntax error, unrecognized expression: "+b);
};

var A=x.getText=function(b){
    var c,
    e;
    c=b.nodeType;
    var f="";
    if(c)if(1===c||9===c||11===c){
        if("string"===typeof b.textContent)return b.textContent;
        if("string"===typeof b.innerText)return b.innerText.replace(o,"");
        for(b=b.firstChild;b;b=b.nextSibling)f+=A(b)
            }else{
        if(3===c||4===c)return b.nodeValue
            }else for(c=0;e=b[c];c++)8!==e.nodeType&&(f+=A(e));
    return f
    },B=x.selectors={
    order:["ID","NAME","TAG"],
    match:{
        ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,
        CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,
        NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,
        ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,
        TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,
        CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,
        POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,
        PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/
    },
    leftMatch:{},
    attrMap:{
        "class":"className",
        "for":"htmlFor"
    },
    attrHandle:{
        href:function(b){
            return b.getAttribute("href")
            },
        type:function(b){
            return b.getAttribute("type")
            }
        },
relative:{
    "+":function(b,c){
        var e="string"===typeof c,f=e&&!q.test(c),e=e&&!f;
        f&&(c=c.toLowerCase());
        for(var f=0,d=b.length,j;f<d;f++)if(j=b[f]){
            for(;(j=j.previousSibling)&&1!==j.nodeType;);
            b[f]=e||j&&j.nodeName.toLowerCase()===c?j||!1:j===c
            }
            e&&x.filter(c,b,!0)
        },
    ">":function(b,c){
        var e,f="string"===typeof c,d=0,j=b.length;
        if(f&&!q.test(c))for(c=c.toLowerCase();d<j;d++){
            if(e=b[d])e=e.parentNode,b[d]=e.nodeName.toLowerCase()===c?e:!1
                }else{
            for(;d<j;d++)(e=
                b[d])&&(b[d]=f?e.parentNode:e.parentNode===c);
            f&&x.filter(c,b,!0)
            }
        },
"":function(c,f,d){
    var g,h=j++,l=e;
    "string"===typeof f&&!q.test(f)&&(g=f=f.toLowerCase(),l=b);
    l("parentNode",f,h,c,g,d)
    },
"~":function(c,f,d){
    var g,h=j++,l=e;
    "string"===typeof f&&!q.test(f)&&(g=f=f.toLowerCase(),l=b);
    l("previousSibling",f,h,c,g,d)
    }
},
find:{
    ID:function(b,c,e){
        if("undefined"!==typeof c.getElementById&&!e)return(b=c.getElementById(b[1]))&&b.parentNode?[b]:[]
            },
    NAME:function(b,c){
        if("undefined"!==typeof c.getElementsByName){
            for(var e=
                [],f=c.getElementsByName(b[1]),d=0,j=f.length;d<j;d++)f[d].getAttribute("name")===b[1]&&e.push(f[d]);
            return 0===e.length?null:e
            }
        },
TAG:function(b,c){
    if("undefined"!==typeof c.getElementsByTagName)return c.getElementsByTagName(b[1])
        }
    },
preFilter:{
    CLASS:function(b,c,e,f,d,j){
        b=" "+b[1].replace(s,"")+" ";
        if(j)return b;
        for(var j=0,g;null!=(g=c[j]);j++)g&&(d^(g.className&&0<=(" "+g.className+" ").replace(/[\t\n\r]/g," ").indexOf(b))?e||f.push(g):e&&(c[j]=!1));
        return!1
        },
    ID:function(b){
        return b[1].replace(s,
            "")
        },
    TAG:function(b){
        return b[1].replace(s,"").toLowerCase()
        },
    CHILD:function(b){
        if("nth"===b[1]){
            b[2]||x.error(b[0]);
            b[2]=b[2].replace(/^\+|\s*/g,"");
            var c=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec("even"===b[2]&&"2n"||"odd"===b[2]&&"2n+1"||!/\D/.test(b[2])&&"0n+"+b[2]||b[2]);
            b[2]=c[1]+(c[2]||1)-0;
            b[3]=c[3]-0
        }else b[2]&&x.error(b[0]);
        b[0]=j++;
        return b
        },
    ATTR:function(b,c,e,f,d,j){
        c=b[1]=b[1].replace(s,"");
        !j&&B.attrMap[c]&&(b[1]=B.attrMap[c]);
        b[4]=(b[4]||b[5]||"").replace(s,"");
        "~="===b[2]&&(b[4]=" "+b[4]+
            " ");
        return b
        },
    PSEUDO:function(b,c,e,d,j){
        if("not"===b[1])if(1<(f.exec(b[3])||"").length||/^\w/.test(b[3]))b[3]=x(b[3],null,null,c);else return b=x.filter(b[3],c,e,1^j),e||d.push.apply(d,b),!1;
        else if(B.match.POS.test(b[0])||B.match.CHILD.test(b[0]))return!0;
        return b
        },
    POS:function(b){
        b.unshift(!0);
        return b
        }
    },
filters:{
    enabled:function(b){
        return!1===b.disabled&&"hidden"!==b.type
        },
    disabled:function(b){
        return!0===b.disabled
        },
    checked:function(b){
        return!0===b.checked
        },
    selected:function(b){
        b.parentNode&&
        b.parentNode.selectedIndex;
        return!0===b.selected
        },
    parent:function(b){
        return!!b.firstChild
        },
    empty:function(b){
        return!b.firstChild
        },
    has:function(b,c,e){
        return!!x(e[3],b).length
        },
    header:function(b){
        return/h\d/i.test(b.nodeName)
        },
    text:function(b){
        var c=b.getAttribute("type"),e=b.type;
        return"input"===b.nodeName.toLowerCase()&&"text"===e&&(c===e||null===c)
        },
    radio:function(b){
        return"input"===b.nodeName.toLowerCase()&&"radio"===b.type
        },
    checkbox:function(b){
        return"input"===b.nodeName.toLowerCase()&&"checkbox"===
        b.type
        },
    file:function(b){
        return"input"===b.nodeName.toLowerCase()&&"file"===b.type
        },
    password:function(b){
        return"input"===b.nodeName.toLowerCase()&&"password"===b.type
        },
    submit:function(b){
        var c=b.nodeName.toLowerCase();
        return("input"===c||"button"===c)&&"submit"===b.type
        },
    image:function(b){
        return"input"===b.nodeName.toLowerCase()&&"image"===b.type
        },
    reset:function(b){
        var c=b.nodeName.toLowerCase();
        return("input"===c||"button"===c)&&"reset"===b.type
        },
    button:function(b){
        var c=b.nodeName.toLowerCase();
        return"input"===c&&"button"===b.type||"button"===c
        },
    input:function(b){
        return/input|select|textarea|button/i.test(b.nodeName)
        },
    focus:function(b){
        return b===b.ownerDocument.activeElement
        }
    },
setFilters:{
    first:function(b,c){
        return 0===c
        },
    last:function(b,c,e,f){
        return c===f.length-1
        },
    even:function(b,c){
        return 0===c%2
        },
    odd:function(b,c){
        return 1===c%2
        },
    lt:function(b,c,e){
        return c<e[3]-0
        },
    gt:function(b,c,e){
        return c>e[3]-0
        },
    nth:function(b,c,e){
        return e[3]-0===c
        },
    eq:function(b,c,e){
        return e[3]-0===c
        }
    },
filter:{
    PSEUDO:function(b,
        c,e,f){
        var d=c[1],j=B.filters[d];
        if(j)return j(b,e,c,f);
        if("contains"===d)return 0<=(b.textContent||b.innerText||A([b])||"").indexOf(c[3]);
        if("not"===d){
            c=c[3];
            e=0;
            for(f=c.length;e<f;e++)if(c[e]===b)return!1;return!0
            }
            x.error(d)
        },
    CHILD:function(b,c){
        var e,f,j,g,h,l;
        e=c[1];
        l=b;
        switch(e){
            case "only":case "first":
                for(;l=l.previousSibling;)if(1===l.nodeType)return!1;if("first"===e)return!0;
                l=b;
            case "last":
                for(;l=l.nextSibling;)if(1===l.nodeType)return!1;return!0;
            case "nth":
                e=c[2];
                f=c[3];
                if(1===e&&0===
                f)return!0;
                j=c[0];
                if((g=b.parentNode)&&(g[d]!==j||!b.nodeIndex)){
                h=0;
                for(l=g.firstChild;l;l=l.nextSibling)1===l.nodeType&&(l.nodeIndex=++h);
                g[d]=j
                }
                l=b.nodeIndex-f;
            return 0===e?0===l:0===l%e&&0<=l/e
            }
            },
ID:function(b,c){
    return 1===b.nodeType&&b.getAttribute("id")===c
    },
TAG:function(b,c){
    return"*"===c&&1===b.nodeType||!!b.nodeName&&b.nodeName.toLowerCase()===c
    },
CLASS:function(b,c){
    return-1<(" "+(b.className||b.getAttribute("class"))+" ").indexOf(c)
    },
ATTR:function(b,c){
    var e=c[1],e=x.attr?x.attr(b,e):B.attrHandle[e]?
    B.attrHandle[e](b):null!=b[e]?b[e]:b.getAttribute(e),f=e+"",d=c[2],j=c[4];
    return null==e?"!="===d:!d&&x.attr?null!=e:"="===d?f===j:"*="===d?0<=f.indexOf(j):"~="===d?0<=(" "+f+" ").indexOf(j):!j?f&&!1!==e:"!="===d?f!==j:"^="===d?0===f.indexOf(j):"$="===d?f.substr(f.length-j.length)===j:"|="===d?f===j||f.substr(0,j.length+1)===j+"-":!1
    },
POS:function(b,c,e,f){
    var d=B.setFilters[c[2]];
    if(d)return d(b,e,c,f)
        }
    }
},i=B.match.POS,H=function(b,c){
    return"\\"+(c-0+1)
    },G;
for(G in B.match)B.match[G]=RegExp(B.match[G].source+
    /(?![^\[]*\])(?![^\(]*\))/.source),B.leftMatch[G]=RegExp(/(^(?:.|\r|\n)*?)/.source+B.match[G].source.replace(/\\(\d+)/g,H));B.match.globalPOS=i;
var I=function(b,c){
    b=Array.prototype.slice.call(b,0);
    return c?(c.push.apply(c,b),c):b
    };
    
try{
    Array.prototype.slice.call(t.documentElement.childNodes,0)[0].nodeType
    }catch(w){
    I=function(b,c){
        var e=0,f=c||[];
        if("[object Array]"===g.call(b))Array.prototype.push.apply(f,b);
        else if("number"===typeof b.length)for(var d=b.length;e<d;e++)f.push(b[e]);else for(;b[e];e++)f.push(b[e]);
        return f
        }
    }
var L,M;
t.documentElement.compareDocumentPosition?L=function(b,c){
    return b===c?(h=!0,0):!b.compareDocumentPosition||!c.compareDocumentPosition?b.compareDocumentPosition?-1:1:b.compareDocumentPosition(c)&4?-1:1
    }:(L=function(b,c){
    if(b===c)return h=!0,0;
    if(b.sourceIndex&&c.sourceIndex)return b.sourceIndex-c.sourceIndex;
    var e,f,d=[],j=[];
    e=b.parentNode;
    f=c.parentNode;
    var g=e;
    if(e===f)return M(b,c);
    if(e){
        if(!f)return 1
            }else return-1;
    for(;g;)d.unshift(g),g=g.parentNode;
    for(g=f;g;)j.unshift(g),
        g=g.parentNode;
    e=d.length;
    f=j.length;
    for(g=0;g<e&&g<f;g++)if(d[g]!==j[g])return M(d[g],j[g]);return g===e?M(b,j[g],-1):M(d[g],c,1)
    },M=function(b,c,e){
    if(b===c)return e;
    for(b=b.nextSibling;b;){
        if(b===c)return-1;
        b=b.nextSibling
        }
        return 1
    });
(function(){
    var b=t.createElement("div"),e="script"+(new Date).getTime(),f=t.documentElement;
    b.innerHTML="<a name='"+e+"'/>";
    f.insertBefore(b,f.firstChild);
    t.getElementById(e)&&(B.find.ID=function(b,e,f){
        if("undefined"!==typeof e.getElementById&&!f)return(e=e.getElementById(b[1]))?
            e.id===b[1]||"undefined"!==typeof e.getAttributeNode&&e.getAttributeNode("id").nodeValue===b[1]?[e]:c:[]
            },B.filter.ID=function(b,c){
        var e="undefined"!==typeof b.getAttributeNode&&b.getAttributeNode("id");
        return 1===b.nodeType&&e&&e.nodeValue===c
        });
    f.removeChild(b);
    f=b=null
    })();
(function(){
    var b=t.createElement("div");
    b.appendChild(t.createComment(""));
    0<b.getElementsByTagName("*").length&&(B.find.TAG=function(b,c){
        var e=c.getElementsByTagName(b[1]);
        if("*"===b[1]){
            for(var f=[],d=0;e[d];d++)1===e[d].nodeType&&
                f.push(e[d]);
            e=f
            }
            return e
        });
    b.innerHTML="<a href='#'></a>";
    b.firstChild&&"undefined"!==typeof b.firstChild.getAttribute&&"#"!==b.firstChild.getAttribute("href")&&(B.attrHandle.href=function(b){
        return b.getAttribute("href",2)
        });
    b=null
    })();
t.querySelectorAll&&function(){
    var b=x,c=t.createElement("div");
    c.innerHTML="<p class='TEST'></p>";
    if(!(c.querySelectorAll&&0===c.querySelectorAll(".TEST").length)){
        x=function(c,e,f,d){
            e=e||t;
            if(!d&&!x.isXML(e)){
                var j=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(c);
                if(j&&(1===e.nodeType||9===e.nodeType)){
                    if(j[1])return I(e.getElementsByTagName(c),f);
                    if(j[2]&&B.find.CLASS&&e.getElementsByClassName)return I(e.getElementsByClassName(j[2]),f)
                        }
                        if(9===e.nodeType){
                    if("body"===c&&e.body)return I([e.body],f);
                    if(j&&j[3]){
                        var g=e.getElementById(j[3]);
                        if(g&&g.parentNode){
                            if(g.id===j[3])return I([g],f)
                                }else return I([],f)
                            }
                            try{
                        return I(e.querySelectorAll(c),f)
                        }catch(h){}
                }else if(1===e.nodeType&&"object"!==e.nodeName.toLowerCase()){
                var j=e,l=(g=e.getAttribute("id"))||"__sizzle__",
                s=e.parentNode,o=/^\s*[+~]/.test(c);
                g?l=l.replace(/'/g,"\\$&"):e.setAttribute("id",l);
                o&&s&&(e=e.parentNode);
                try{
                    if(!o||s)return I(e.querySelectorAll("[id='"+l+"'] "+c),f)
                        }catch(q){}finally{
                    g||j.removeAttribute("id")
                    }
                }
        }
    return b(c,e,f,d)
};

for(var e in b)x[e]=b[e];c=null
}
}();
(function(){
    var b=t.documentElement,c=b.matchesSelector||b.mozMatchesSelector||b.webkitMatchesSelector||b.msMatchesSelector;
    if(c){
        var e=!c.call(t.createElement("div"),"div"),f=!1;
        try{
            c.call(t.documentElement,"[test!='']:sizzle")
            }catch(d){
            f=
            !0
            }
            x.matchesSelector=function(b,d){
            d=d.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");
            if(!x.isXML(b))try{
                if(f||!B.match.PSEUDO.test(d)&&!/!=/.test(d)){
                    var j=c.call(b,d);
                    if(j||!e||b.document&&11!==b.document.nodeType)return j
                        }
                    }catch(g){}
            return 0<x(d,null,null,[b]).length
        }
    }
})();
(function(){
    var b=t.createElement("div");
    b.innerHTML="<div class='test e'></div><div class='test'></div>";
    b.getElementsByClassName&&0!==b.getElementsByClassName("e").length&&(b.lastChild.className="e",1!==b.getElementsByClassName("e").length&&
        (B.order.splice(1,0,"CLASS"),B.find.CLASS=function(b,c,e){
            if("undefined"!==typeof c.getElementsByClassName&&!e)return c.getElementsByClassName(b[1])
                },b=null))
    })();
x.contains=t.documentElement.contains?function(b,c){
    return b!==c&&(b.contains?b.contains(c):!0)
    }:t.documentElement.compareDocumentPosition?function(b,c){
    return!!(b.compareDocumentPosition(c)&16)
    }:function(){
    return!1
    };
    
x.isXML=function(b){
    return(b=(b?b.ownerDocument||b:0).documentElement)?"HTML"!==b.nodeName:!1
    };
    
var K=function(b,c,e){
    for(var f,
        d=[],j="",c=c.nodeType?[c]:c;f=B.match.PSEUDO.exec(b);)j+=f[0],b=b.replace(B.match.PSEUDO,"");
    b=B.relative[b]?b+"*":b;
    f=0;
    for(var g=c.length;f<g;f++)x(b,c[f],d,e);
    return x.filter(j,d)
    };
    
x.attr=k.attr;
x.selectors.attrMap={};

k.find=x;
k.expr=x.selectors;
k.expr[":"]=k.expr.filters;
k.unique=x.uniqueSort;
k.text=x.getText;
k.isXMLDoc=x.isXML;
k.contains=x.contains
})();
var ea=/Until$/,fa=/^(?:parents|prevUntil|prevAll)/,ia=/,/,ja=/^.[^:#\[\.,]*$/,la=Array.prototype.slice,ha=k.expr.match.globalPOS,na={
    children:!0,
    contents:!0,
    next:!0,
    prev:!0
    };
    
k.fn.extend({
    find:function(b){
        var c=this,e,f;
        if("string"!==typeof b)return k(b).filter(function(){
            for(e=0,f=c.length;e<f;e++)if(k.contains(c[e],this))return!0
                });
        var d=this.pushStack("","find",b),j,g,h;
        for(e=0,f=this.length;e<f;e++)if(j=d.length,k.find(b,this[e],d),0<e)for(g=j;g<d.length;g++)for(h=0;h<j;h++)if(d[h]===d[g]){
            d.splice(g--,1);
            break
        }
        return d
        },
    has:function(b){
        var c=k(b);
        return this.filter(function(){
            for(var b=0,e=c.length;b<e;b++)if(k.contains(this,c[b]))return!0
                })
        },
    not:function(b){
        return this.pushStack(l(this,b,!1),"not",b)
        },
    filter:function(b){
        return this.pushStack(l(this,b,!0),"filter",b)
        },
    is:function(b){
        return!!b&&("string"===typeof b?ha.test(b)?0<=k(b,this.context).index(this[0]):0<k.filter(b,this).length:0<this.filter(b).length)
        },
    closest:function(b,c){
        var e=[],f,d,j=this[0];
        if(k.isArray(b)){
            for(d=1;j&&j.ownerDocument&&j!==c;){
                for(f=0;f<b.length;f++)k(j).is(b[f])&&e.push({
                    selector:b[f],
                    elem:j,
                    level:d
                });
                j=j.parentNode;
                d++
            }
            return e
            }
            var g=ha.test(b)||"string"!==
        typeof b?k(b,c||this.context):0;
        for(f=0,d=this.length;f<d;f++)for(j=this[f];j;)if(g?-1<g.index(j):k.find.matchesSelector(j,b)){
            e.push(j);
            break
        }else if(j=j.parentNode,!j||!j.ownerDocument||j===c||11===j.nodeType)break;e=1<e.length?k.unique(e):e;
        return this.pushStack(e,"closest",b)
        },
    index:function(b){
        return!b?this[0]&&this[0].parentNode?this.prevAll().length:-1:"string"===typeof b?k.inArray(this[0],k(b)):k.inArray(b.jquery?b[0]:b,this)
        },
    add:function(b,c){
        var e="string"===typeof b?k(b,c):k.makeArray(b&&
            b.nodeType?[b]:b),f=k.merge(this.get(),e);
        return this.pushStack(!e[0]||!e[0].parentNode||11===e[0].parentNode.nodeType||!f[0]||!f[0].parentNode||11===f[0].parentNode.nodeType?f:k.unique(f))
        },
    andSelf:function(){
        return this.add(this.prevObject)
        }
    });
k.each({
    parent:function(b){
        return(b=b.parentNode)&&11!==b.nodeType?b:null
        },
    parents:function(b){
        return k.dir(b,"parentNode")
        },
    parentsUntil:function(b,c,e){
        return k.dir(b,"parentNode",e)
        },
    next:function(b){
        return k.nth(b,2,"nextSibling")
        },
    prev:function(b){
        return k.nth(b,
            2,"previousSibling")
        },
    nextAll:function(b){
        return k.dir(b,"nextSibling")
        },
    prevAll:function(b){
        return k.dir(b,"previousSibling")
        },
    nextUntil:function(b,c,e){
        return k.dir(b,"nextSibling",e)
        },
    prevUntil:function(b,c,e){
        return k.dir(b,"previousSibling",e)
        },
    siblings:function(b){
        return k.sibling((b.parentNode||{}).firstChild,b)
        },
    children:function(b){
        return k.sibling(b.firstChild)
        },
    contents:function(b){
        return k.nodeName(b,"iframe")?b.contentDocument||b.contentWindow.document:k.makeArray(b.childNodes)
        }
    },function(b,
    c){
    k.fn[b]=function(e,f){
        var d=k.map(this,c,e);
        ea.test(b)||(f=e);
        f&&"string"===typeof f&&(d=k.filter(f,d));
        d=1<this.length&&!na[b]?k.unique(d):d;
        if((1<this.length||ia.test(f))&&fa.test(b))d=d.reverse();
        return this.pushStack(d,b,la.call(arguments).join(","))
        }
    });
k.extend({
    filter:function(b,c,e){
        e&&(b=":not("+b+")");
        return 1===c.length?k.find.matchesSelector(c[0],b)?[c[0]]:[]:k.find.matches(b,c)
        },
    dir:function(b,e,f){
        for(var d=[],b=b[e];b&&9!==b.nodeType&&(f===c||1!==b.nodeType||!k(b).is(f));)1===b.nodeType&&
            d.push(b),b=b[e];
        return d
        },
    nth:function(b,c,e){
        for(var c=c||1,f=0;b&&!(1===b.nodeType&&++f===c);b=b[e]);
        return b
        },
    sibling:function(b,c){
        for(var e=[];b;b=b.nextSibling)1===b.nodeType&&b!==c&&e.push(b);
        return e
        }
    });
var ka="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",pa=/ jQuery\d+="(?:\d+|null)"/g,ga=/^\s+/,ma=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,oa=/<([\w:]+)/,
ta=/<tbody/i,ua=/<|&#?\w+;/,va=/<(?:script|style)/i,Ca=/<(?:script|object|embed|option|style)/i,wa=RegExp("<(?:"+ka+")[\\s/>]","i"),xa=/checked\s*(?:[^=]|=\s*.checked.)/i,Ba=/\/(java|ecma)script/i,Fa=/^\s*<!(?:\[CDATA\[|\-\-)/,qa={
    option:[1,"<select multiple='multiple'>","</select>"],
    legend:[1,"<fieldset>","</fieldset>"],
    thead:[1,"<table>","</table>"],
    tr:[2,"<table><tbody>","</tbody></table>"],
    td:[3,"<table><tbody><tr>","</tr></tbody></table>"],
    col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],
    area:[1,"<map>","</map>"],
    _default:[0,"",""]
    },ya=o(t);
qa.optgroup=qa.option;
qa.tbody=qa.tfoot=qa.colgroup=qa.caption=qa.thead;
qa.th=qa.td;
k.support.htmlSerialize||(qa._default=[1,"div<div>","</div>"]);
k.fn.extend({
    text:function(b){
        return k.access(this,function(b){
            return b===c?k.text(this):this.empty().append((this[0]&&this[0].ownerDocument||t).createTextNode(b))
            },null,b,arguments.length)
        },
    wrapAll:function(b){
        if(k.isFunction(b))return this.each(function(c){
            k(this).wrapAll(b.call(this,c))
            });
        if(this[0]){
            var c=
            k(b,this[0].ownerDocument).eq(0).clone(!0);
            this[0].parentNode&&c.insertBefore(this[0]);
            c.map(function(){
                for(var b=this;b.firstChild&&1===b.firstChild.nodeType;)b=b.firstChild;
                return b
                }).append(this)
            }
            return this
        },
    wrapInner:function(b){
        return k.isFunction(b)?this.each(function(c){
            k(this).wrapInner(b.call(this,c))
            }):this.each(function(){
            var c=k(this),e=c.contents();
            e.length?e.wrapAll(b):c.append(b)
            })
        },
    wrap:function(b){
        var c=k.isFunction(b);
        return this.each(function(e){
            k(this).wrapAll(c?b.call(this,e):
                b)
            })
        },
    unwrap:function(){
        return this.parent().each(function(){
            k.nodeName(this,"body")||k(this).replaceWith(this.childNodes)
            }).end()
        },
    append:function(){
        return this.domManip(arguments,!0,function(b){
            1===this.nodeType&&this.appendChild(b)
            })
        },
    prepend:function(){
        return this.domManip(arguments,!0,function(b){
            1===this.nodeType&&this.insertBefore(b,this.firstChild)
            })
        },
    before:function(){
        if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(b){
            this.parentNode.insertBefore(b,this)
            });
        if(arguments.length){
            var b=
            k.clean(arguments);
            b.push.apply(b,this.toArray());
            return this.pushStack(b,"before",arguments)
            }
        },
after:function(){
    if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(b){
        this.parentNode.insertBefore(b,this.nextSibling)
        });
    if(arguments.length){
        var b=this.pushStack(this,"after",arguments);
        b.push.apply(b,k.clean(arguments));
        return b
        }
    },
remove:function(b,c){
    for(var e=0,f;null!=(f=this[e]);e++)if(!b||k.filter(b,[f]).length)!c&&1===f.nodeType&&(k.cleanData(f.getElementsByTagName("*")),
        k.cleanData([f])),f.parentNode&&f.parentNode.removeChild(f);return this
    },
empty:function(){
    for(var b=0,c;null!=(c=this[b]);b++)for(1===c.nodeType&&k.cleanData(c.getElementsByTagName("*"));c.firstChild;)c.removeChild(c.firstChild);
    return this
    },
clone:function(b,c){
    b=null==b?!1:b;
    c=null==c?b:c;
    return this.map(function(){
        return k.clone(this,b,c)
        })
    },
html:function(b){
    return k.access(this,function(b){
        var e=this[0]||{},f=0,d=this.length;
        if(b===c)return 1===e.nodeType?e.innerHTML.replace(pa,""):null;
        if("string"===
            typeof b&&!va.test(b)&&(k.support.leadingWhitespace||!ga.test(b))&&!qa[(oa.exec(b)||["",""])[1].toLowerCase()]){
            b=b.replace(ma,"<$1></$2>");
            try{
                for(;f<d;f++)e=this[f]||{},1===e.nodeType&&(k.cleanData(e.getElementsByTagName("*")),e.innerHTML=b);
                e=0
                }catch(j){}
        }
        e&&this.empty().append(b)
        },null,b,arguments.length)
},
replaceWith:function(b){
    if(this[0]&&this[0].parentNode){
        if(k.isFunction(b))return this.each(function(c){
            var e=k(this),f=e.html();
            e.replaceWith(b.call(this,c,f))
            });
        "string"!==typeof b&&(b=k(b).detach());
        return this.each(function(){
            var c=this.nextSibling,e=this.parentNode;
            k(this).remove();
            c?k(c).before(b):k(e).append(b)
            })
        }
        return this.length?this.pushStack(k(k.isFunction(b)?b():b),"replaceWith",b):this
    },
detach:function(b){
    return this.remove(b,!0)
    },
domManip:function(b,e,f){
    var d,j,g,h=b[0],l=[];
    if(!k.support.checkClone&&3===arguments.length&&"string"===typeof h&&xa.test(h))return this.each(function(){
        k(this).domManip(b,e,f,!0)
        });
    if(k.isFunction(h))return this.each(function(d){
        var j=k(this);
        b[0]=h.call(this,
            d,e?j.html():c);
        j.domManip(b,e,f)
        });
    if(this[0]){
        d=h&&h.parentNode;
        d=k.support.parentNode&&d&&11===d.nodeType&&d.childNodes.length===this.length?{
            fragment:d
        }:k.buildFragment(b,this,l);
        g=d.fragment;
        if(j=1===g.childNodes.length?g=g.firstChild:g.firstChild){
            e=e&&k.nodeName(j,"tr");
            j=0;
            for(var s=this.length,o=s-1;j<s;j++)f.call(e?k.nodeName(this[j],"table")?this[j].getElementsByTagName("tbody")[0]||this[j].appendChild(this[j].ownerDocument.createElement("tbody")):this[j]:this[j],d.cacheable||1<s&&j<o?
                k.clone(g,!0,!0):g)
            }
            l.length&&k.each(l,function(b,c){
            c.src?k.ajax({
                type:"GET",
                global:!1,
                url:c.src,
                async:!1,
                dataType:"script"
            }):k.globalEval((c.text||c.textContent||c.innerHTML||"").replace(Fa,"/*$0*/"));
            c.parentNode&&c.parentNode.removeChild(c)
            })
        }
        return this
    }
});
k.buildFragment=function(b,c,e){
    var f,d,j,g,h=b[0];
    c&&c[0]&&(g=c[0].ownerDocument||c[0]);
    g.createDocumentFragment||(g=t);
    if(1===b.length&&"string"===typeof h&&512>h.length&&g===t&&"<"===h.charAt(0)&&!Ca.test(h)&&(k.support.checkClone||!xa.test(h))&&
        (k.support.html5Clone||!wa.test(h)))d=!0,(j=k.fragments[h])&&1!==j&&(f=j);
    f||(f=g.createDocumentFragment(),k.clean(b,g,f,e));
    d&&(k.fragments[h]=j?f:1);
    return{
        fragment:f,
        cacheable:d
    }
};

k.fragments={};

k.each({
    appendTo:"append",
    prependTo:"prepend",
    insertBefore:"before",
    insertAfter:"after",
    replaceAll:"replaceWith"
},function(b,c){
    k.fn[b]=function(e){
        var f=[],e=k(e),d=1===this.length&&this[0].parentNode;
        if(d&&11===d.nodeType&&1===d.childNodes.length&&1===e.length)return e[c](this[0]),this;
        for(var d=0,j=
            e.length;d<j;d++){
            var g=(0<d?this.clone(!0):this).get();
            k(e[d])[c](g);
            f=f.concat(g)
            }
            return this.pushStack(f,b,e.selector)
        }
    });
k.extend({
    clone:function(b,c,e){
        var f,d,j;
        k.support.html5Clone||k.isXMLDoc(b)||!wa.test("<"+b.nodeName+">")?f=b.cloneNode(!0):(f=t.createElement("div"),ya.appendChild(f),f.innerHTML=b.outerHTML,f=f.firstChild);
        var g=f;
        if((!k.support.noCloneEvent||!k.support.noCloneChecked)&&(1===b.nodeType||11===b.nodeType)&&!k.isXMLDoc(b)){
            A(b,g);
            f=i(b);
            d=i(g);
            for(j=0;f[j];++j)d[j]&&A(f[j],
                d[j])
            }
            if(c&&(q(b,g),e)){
            f=i(b);
            d=i(g);
            for(j=0;f[j];++j)q(f[j],d[j])
                }
                return g
        },
    clean:function(b,c,e,f){
        var d,j=[],c=c||t;
        "undefined"===typeof c.createElement&&(c=c.ownerDocument||c[0]&&c[0].ownerDocument||t);
        for(var g=0,h;null!=(h=b[g]);g++)if("number"===typeof h&&(h+=""),h){
            if("string"===typeof h)if(ua.test(h)){
                h=h.replace(ma,"<$1></$2>");
                d=(oa.exec(h)||["",""])[1].toLowerCase();
                var l=qa[d]||qa._default,s=l[0],q=c.createElement("div"),B=ya.childNodes;
                c===t?ya.appendChild(q):o(c).appendChild(q);
                for(q.innerHTML=
                    l[1]+h+l[2];s--;)q=q.lastChild;
                if(!k.support.tbody){
                    s=ta.test(h);
                    l="table"===d&&!s?q.firstChild&&q.firstChild.childNodes:"<table>"===l[1]&&!s?q.childNodes:[];
                    for(d=l.length-1;0<=d;--d)k.nodeName(l[d],"tbody")&&!l[d].childNodes.length&&l[d].parentNode.removeChild(l[d])
                        }!k.support.leadingWhitespace&&ga.test(h)&&q.insertBefore(c.createTextNode(ga.exec(h)[0]),q.firstChild);
                h=q.childNodes;
                q&&(q.parentNode.removeChild(q),0<B.length&&(q=B[B.length-1])&&q.parentNode&&q.parentNode.removeChild(q))
                }else h=c.createTextNode(h);
            var A;
            if(!k.support.appendChecked)if(h[0]&&"number"===typeof(A=h.length))for(d=0;d<A;d++)x(h[d]);else x(h);
            h.nodeType?j.push(h):j=k.merge(j,h)
            }
            if(e){
            b=function(b){
                return!b.type||Ba.test(b.type)
                };
                
            for(g=0;j[g];g++)c=j[g],f&&k.nodeName(c,"script")&&(!c.type||Ba.test(c.type))?f.push(c.parentNode?c.parentNode.removeChild(c):c):(1===c.nodeType&&(h=k.grep(c.getElementsByTagName("script"),b),j.splice.apply(j,[g+1,0].concat(h))),e.appendChild(c))
                }
                return j
        },
    cleanData:function(b){
        for(var c,e,f=k.cache,d=k.event.special,
            j=k.support.deleteExpando,g=0,h;null!=(h=b[g]);g++)if(!h.nodeName||!k.noData[h.nodeName.toLowerCase()])if(e=h[k.expando]){
            if((c=f[e])&&c.events){
                for(var l in c.events)d[l]?k.event.remove(h,l):k.removeEvent(h,l,c.handle);c.handle&&(c.handle.elem=null)
                }
                j?delete h[k.expando]:h.removeAttribute&&h.removeAttribute(k.expando);
            delete f[e]
        }
        }
        });
var Aa=/alpha\([^)]*\)/i,Ma=/opacity=([^)]*)/,Qa=/([A-Z]|^ms)/g,Ra=/^[\-+]?(?:\d*\.)?\d+$/i,Da=/^-?(?:\d*\.)?\d+(?!px)[^\d\s]+$/i,Va=/^([\-+])=([\-+.\de]+)/,db=/^margin/,
eb={
    position:"absolute",
    visibility:"hidden",
    display:"block"
},ab=["Top","Right","Bottom","Left"],rb,Na,Oa;
k.fn.css=function(b,e){
    return k.access(this,function(b,e,f){
        return f!==c?k.style(b,e,f):k.css(b,e)
        },b,e,1<arguments.length)
    };
    
k.extend({
    cssHooks:{
        opacity:{
            get:function(b,c){
                if(c){
                    var e=rb(b,"opacity");
                    return""===e?"1":e
                    }
                    return b.style.opacity
                }
            }
    },
cssNumber:{
    fillOpacity:!0,
    fontWeight:!0,
    lineHeight:!0,
    opacity:!0,
    orphans:!0,
    widows:!0,
    zIndex:!0,
    zoom:!0
    },
cssProps:{
    "float":k.support.cssFloat?"cssFloat":
    "styleFloat"
    },
style:function(b,e,f,d){
    if(b&&!(3===b.nodeType||8===b.nodeType||!b.style)){
        var j,g=k.camelCase(e),h=b.style,l=k.cssHooks[g],e=k.cssProps[g]||g;
        if(f!==c){
            d=typeof f;
            if("string"===d&&(j=Va.exec(f)))f=+(j[1]+1)*+j[2]+parseFloat(k.css(b,e)),d="number";
            if(!(null==f||"number"===d&&isNaN(f)))if("number"===d&&!k.cssNumber[g]&&(f+="px"),!l||!("set"in l)||(f=l.set(b,f))!==c)try{
                h[e]=f
                }catch(s){}
                }else return l&&"get"in l&&(j=l.get(b,!1,d))!==c?j:h[e]
        }
    },
css:function(b,e,f){
    var d,j,e=k.camelCase(e);
    j=k.cssHooks[e];
    e=k.cssProps[e]||e;
    "cssFloat"===e&&(e="float");
    if(j&&"get"in j&&(d=j.get(b,!0,f))!==c)return d;
    if(rb)return rb(b,e)
        },
swap:function(b,c,e){
    var f={},d;
    for(d in c)f[d]=b.style[d],b.style[d]=c[d];e=e.call(b);
    for(d in c)b.style[d]=f[d];return e
    }
});
k.curCSS=k.css;
t.defaultView&&t.defaultView.getComputedStyle&&(Na=function(b,c){
    var e,f,d,j=b.style,c=c.replace(Qa,"-$1").toLowerCase();
    if((f=b.ownerDocument.defaultView)&&(d=f.getComputedStyle(b,null)))e=d.getPropertyValue(c),""===e&&!k.contains(b.ownerDocument.documentElement,
        b)&&(e=k.style(b,c));
    !k.support.pixelMargin&&d&&db.test(c)&&Da.test(e)&&(f=j.width,j.width=e,e=d.width,j.width=f);
    return e
    });
t.documentElement.currentStyle&&(Oa=function(b,c){
    var e,f,d=b.currentStyle&&b.currentStyle[c],j=b.style;
    if(null==d&&j&&(e=j[c]))d=e;
    if(Da.test(d)){
        e=j.left;
        if(f=b.runtimeStyle&&b.runtimeStyle.left)b.runtimeStyle.left=b.currentStyle.left;
        j.left="fontSize"===c?"1em":d;
        d=j.pixelLeft+"px";
        j.left=e;
        f&&(b.runtimeStyle.left=f)
        }
        return""===d?"auto":d
    });
rb=Na||Oa;
k.each(["height","width"],
    function(b,c){
        k.cssHooks[c]={
            get:function(b,e,f){
                if(e)return 0!==b.offsetWidth?H(b,c,f):k.swap(b,eb,function(){
                    return H(b,c,f)
                    })
                },
            set:function(b,c){
                return Ra.test(c)?c+"px":c
                }
            }
    });
k.support.opacity||(k.cssHooks.opacity={
    get:function(b,c){
        return Ma.test((c&&b.currentStyle?b.currentStyle.filter:b.style.filter)||"")?parseFloat(RegExp.$1)/100+"":c?"1":""
        },
    set:function(b,c){
        var e=b.style,f=b.currentStyle,d=k.isNumeric(c)?"alpha(opacity="+100*c+")":"",j=f&&f.filter||e.filter||"";
        e.zoom=1;
        if(1<=c&&""===k.trim(j.replace(Aa,
            ""))&&(e.removeAttribute("filter"),f&&!f.filter))return;
        e.filter=Aa.test(j)?j.replace(Aa,d):j+" "+d
        }
    });
k(function(){
    k.support.reliableMarginRight||(k.cssHooks.marginRight={
        get:function(b,c){
            return k.swap(b,{
                display:"inline-block"
            },function(){
                return c?rb(b,"margin-right"):b.style.marginRight
                })
            }
        })
});
k.expr&&k.expr.filters&&(k.expr.filters.hidden=function(b){
    var c=b.offsetHeight;
    return 0===b.offsetWidth&&0===c||!k.support.reliableHiddenOffsets&&"none"===(b.style&&b.style.display||k.css(b,"display"))
    },
k.expr.filters.visible=function(b){
    return!k.expr.filters.hidden(b)
    });
k.each({
    margin:"",
    padding:"",
    border:"Width"
},function(b,c){
    k.cssHooks[b+c]={
        expand:function(e){
            for(var f="string"===typeof e?e.split(" "):[e],d={},e=0;4>e;e++)d[b+ab[e]+c]=f[e]||f[e-2]||f[0];
            return d
            }
        }
});
var fb=/%20/g,gb=/\[\]$/,Sa=/\r?\n/g,hb=/#.*$/,ib=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,jb=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,kb=/^(?:GET|HEAD)$/,lb=/^\/\//,
Ua=/\?/,mb=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,nb=/^(?:select|textarea)/i,Wa=/\s+/,pb=/([?&])_=[^&]*/,Xa=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,Ya=k.fn.load,Ja={},Za={},bb,cb,$a=["*/"]+["*"];
try{
    bb=y.href
    }catch(Bb){
    bb=t.createElement("a"),bb.href="",bb=bb.href
    }
    cb=Xa.exec(bb.toLowerCase())||[];
k.fn.extend({
    load:function(b,e,f){
        if("string"!==typeof b&&Ya)return Ya.apply(this,arguments);
        if(!this.length)return this;
        var d=b.indexOf(" ");
        if(0<=d)var j=b.slice(d,b.length),b=b.slice(0,
            d);
        d="GET";
        e&&(k.isFunction(e)?(f=e,e=c):"object"===typeof e&&(e=k.param(e,k.ajaxSettings.traditional),d="POST"));
        var g=this;
        k.ajax({
            url:b,
            type:d,
            dataType:"html",
            data:e,
            complete:function(b,c,e){
                e=b.responseText;
                b.isResolved()&&(b.done(function(b){
                    e=b
                    }),g.html(j?k("<div>").append(e.replace(mb,"")).find(j):e));
                f&&g.each(f,[e,c,b])
                }
            });
    return this
    },
serialize:function(){
    return k.param(this.serializeArray())
    },
serializeArray:function(){
    return this.map(function(){
        return this.elements?k.makeArray(this.elements):
        this
        }).filter(function(){
        return this.name&&!this.disabled&&(this.checked||nb.test(this.nodeName)||jb.test(this.type))
        }).map(function(b,c){
        var e=k(this).val();
        return null==e?null:k.isArray(e)?k.map(e,function(b){
            return{
                name:c.name,
                value:b.replace(Sa,"\r\n")
                }
            }):{
        name:c.name,
        value:e.replace(Sa,"\r\n")
        }
    }).get()
}
});
k.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(b,c){
    k.fn[c]=function(b){
        return this.on(c,b)
        }
    });
k.each(["get","post"],function(b,e){
    k[e]=function(b,
        f,d,j){
        k.isFunction(f)&&(j=j||d,d=f,f=c);
        return k.ajax({
            type:e,
            url:b,
            data:f,
            success:d,
            dataType:j
        })
        }
    });
k.extend({
    getScript:function(b,e){
        return k.get(b,c,e,"script")
        },
    getJSON:function(b,c,e){
        return k.get(b,c,e,"json")
        },
    ajaxSetup:function(b,c){
        c?L(b,k.ajaxSettings):(c=b,b=k.ajaxSettings);
        L(b,c);
        return b
        },
    ajaxSettings:{
        url:bb,
        isLocal:/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/.test(cb[1]),
        global:!0,
        type:"GET",
        contentType:"application/x-www-form-urlencoded; charset=UTF-8",
        processData:!0,
        async:!0,
        accepts:{
            xml:"application/xml, text/xml",
            html:"text/html",
            text:"text/plain",
            json:"application/json, text/javascript",
            "*":$a
        },
        contents:{
            xml:/xml/,
            html:/html/,
            json:/json/
        },
        responseFields:{
            xml:"responseXML",
            text:"responseText"
        },
        converters:{
            "* text":d.String,
            "text html":!0,
            "text json":k.parseJSON,
            "text xml":k.parseXML
            },
        flatOptions:{
            context:!0,
            url:!0
            }
        },
ajaxPrefilter:B(Ja),
    ajaxTransport:B(Za),
    ajax:function(b,e){
    function f(b,e,q,x){
        if(2!==w){
            w=2;
            H&&clearTimeout(H);
            i=c;
            B=x||"";
            K.readyState=0<b?4:
            0;
            var A,G,I,x=e;
            if(q){
                var M=d,P=K,m=M.contents,n=M.dataTypes,ra=M.responseFields,t,Q,v,u;
                for(Q in ra)Q in q&&(P[ra[Q]]=q[Q]);for(;"*"===n[0];)n.shift(),t===c&&(t=M.mimeType||P.getResponseHeader("content-type"));
                if(t)for(Q in m)if(m[Q]&&m[Q].test(t)){
                    n.unshift(Q);
                    break
                }
                if(n[0]in q)v=n[0];
                else{
                    for(Q in q){
                        if(!n[0]||M.converters[Q+" "+n[0]]){
                            v=Q;
                            break
                        }
                        u||(u=Q)
                        }
                        v=v||u
                    }
                    v?(v!==n[0]&&n.unshift(v),q=q[v]):q=void 0
                }else q=c;
            if(200<=b&&300>b||304===b){
                if(d.ifModified){
                    if(t=K.getResponseHeader("Last-Modified"))k.lastModified[o]=
                        t;
                    if(t=K.getResponseHeader("Etag"))k.etag[o]=t
                        }
                        if(304===b)x="notmodified",A=!0;else try{
                    t=d;
                    t.dataFilter&&(q=t.dataFilter(q,t.dataType));
                    var ca=t.dataTypes;
                    Q={};
                    
                    var Ka,z,V=ca.length,Cb,y=ca[0],sb,Gb,La,sa,C;
                    for(Ka=1;Ka<V;Ka++){
                        if(1===Ka)for(z in t.converters)"string"===typeof z&&(Q[z.toLowerCase()]=t.converters[z]);sb=y;
                        y=ca[Ka];
                        if("*"===y)y=sb;
                        else if("*"!==sb&&sb!==y){
                            Gb=sb+" "+y;
                            La=Q[Gb]||Q["* "+y];
                            if(!La)for(sa in C=c,Q)if(Cb=sa.split(" "),Cb[0]===sb||"*"===Cb[0])if(C=Q[Cb[1]+" "+y]){
                                sa=Q[sa];
                                !0===sa?La=C:!0===C&&(La=sa);
                                break
                            }!La&&!C&&k.error("No conversion from "+Gb.replace(" "," to "));
                            !0!==La&&(q=La?La(q):C(sa(q)))
                            }
                        }
                    G=q;
                x="success";
                A=!0
                }catch(Ee){
                    x="parsererror",I=Ee
                    }
                }else if(I=x,!x||b)x="error",0>b&&(b=0);
    K.status=b;
    K.statusText=""+(e||x);
    A?h.resolveWith(j,[G,x,K]):h.rejectWith(j,[K,x,I]);
    K.statusCode(s);
    s=c;
    L&&g.trigger("ajax"+(A?"Success":"Error"),[K,d,A?G:I]);
    l.fireWith(j,[K,x]);
    L&&(g.trigger("ajaxComplete",[K,d]),--k.active||k.event.trigger("ajaxStop"))
    }
}
"object"===typeof b&&
(e=b,b=c);
var e=e||{},d=k.ajaxSetup({},e),j=d.context||d,g=j!==d&&(j.nodeType||j instanceof k)?k(j):k.event,h=k.Deferred(),l=k.Callbacks("once memory"),s=d.statusCode||{},o,q={},x={},B,A,i,H,G,w=0,L,M,K={
    readyState:0,
    setRequestHeader:function(b,c){
        if(!w){
            var e=b.toLowerCase(),b=x[e]=x[e]||b;
            q[b]=c
            }
            return this
        },
    getAllResponseHeaders:function(){
        return 2===w?B:null
        },
    getResponseHeader:function(b){
        var e;
        if(2===w){
            if(!A)for(A={};
                e=ib.exec(B);)A[e[1].toLowerCase()]=e[2];
            e=A[b.toLowerCase()]
            }
            return e===c?
        null:e
        },
    overrideMimeType:function(b){
        w||(d.mimeType=b);
        return this
        },
    abort:function(b){
        b=b||"abort";
        i&&i.abort(b);
        f(0,b);
        return this
        }
    };

h.promise(K);
K.success=K.done;
K.error=K.fail;
K.complete=l.add;
K.statusCode=function(b){
    if(b){
        var c;
        if(2>w)for(c in b)s[c]=[s[c],b[c]];else c=b[K.status],K.then(c,c)
            }
            return this
    };
    
d.url=((b||d.url)+"").replace(hb,"").replace(lb,cb[1]+"//");
d.dataTypes=k.trim(d.dataType||"*").toLowerCase().split(Wa);
null==d.crossDomain&&(G=Xa.exec(d.url.toLowerCase()),d.crossDomain=!(!G||
    !(G[1]!=cb[1]||G[2]!=cb[2]||(G[3]||("http:"===G[1]?80:443))!=(cb[3]||("http:"===cb[1]?80:443)))));
d.data&&d.processData&&"string"!==typeof d.data&&(d.data=k.param(d.data,d.traditional));
I(Ja,d,e,K);
if(2===w)return!1;
L=d.global;
d.type=d.type.toUpperCase();
d.hasContent=!kb.test(d.type);
L&&0===k.active++&&k.event.trigger("ajaxStart");
if(!d.hasContent&&(d.data&&(d.url+=(Ua.test(d.url)?"&":"?")+d.data,delete d.data),o=d.url,!1===d.cache)){
    G=k.now();
    var P=d.url.replace(pb,"$1_="+G);
    d.url=P+(P===d.url?(Ua.test(d.url)?
        "&":"?")+"_="+G:"")
    }(d.data&&d.hasContent&&!1!==d.contentType||e.contentType)&&K.setRequestHeader("Content-Type",d.contentType);
d.ifModified&&(o=o||d.url,k.lastModified[o]&&K.setRequestHeader("If-Modified-Since",k.lastModified[o]),k.etag[o]&&K.setRequestHeader("If-None-Match",k.etag[o]));
K.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+("*"!==d.dataTypes[0]?", "+$a+"; q=0.01":""):d.accepts["*"]);
for(M in d.headers)K.setRequestHeader(M,d.headers[M]);if(d.beforeSend&&
    (!1===d.beforeSend.call(j,K,d)||2===w))return K.abort(),!1;
for(M in{
    success:1,
    error:1,
    complete:1
})K[M](d[M]);if(i=I(Za,d,e,K)){
    K.readyState=1;
    L&&g.trigger("ajaxSend",[K,d]);
    d.async&&0<d.timeout&&(H=setTimeout(function(){
        K.abort("timeout")
        },d.timeout));
    try{
        w=1,i.send(q,f)
        }catch(m){
        if(2>w)f(-1,m);else throw m;
    }
}else f(-1,"No Transport");
return K
},
param:function(b,e){
    var f=[],d=function(b,c){
        c=k.isFunction(c)?c():c;
        f[f.length]=encodeURIComponent(b)+"="+encodeURIComponent(c)
        };
        
    e===c&&(e=k.ajaxSettings.traditional);
    if(k.isArray(b)||b.jquery&&!k.isPlainObject(b))k.each(b,function(){
        d(this.name,this.value)
        });else for(var j in b)M(j,b[j],e,d);return f.join("&").replace(fb,"+")
    }
});
k.extend({
    active:0,
    lastModified:{},
    etag:{}
});
var wb=k.now(),Ea=/(\=)\?(&|$)|\?\?/i;
k.ajaxSetup({
    jsonp:"callback",
    jsonpCallback:function(){
        return k.expando+"_"+wb++
        }
    });
k.ajaxPrefilter("json jsonp",function(b,c,e){
    c="string"===typeof b.data&&/^application\/x\-www\-form\-urlencoded/.test(b.contentType);
    if("jsonp"===b.dataTypes[0]||!1!==b.jsonp&&
        (Ea.test(b.url)||c&&Ea.test(b.data))){
        var f,j=b.jsonpCallback=k.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,g=d[j],h=b.url,l=b.data,s="$1"+j+"$2";
        !1!==b.jsonp&&(h=h.replace(Ea,s),b.url===h&&(c&&(l=l.replace(Ea,s)),b.data===l&&(h+=(/\?/.test(h)?"&":"?")+b.jsonp+"="+j)));
        b.url=h;
        b.data=l;
        d[j]=function(b){
            f=[b]
            };
            
        e.always(function(){
            d[j]=g;
            if(f&&k.isFunction(g))d[j](f[0])
                });
        b.converters["script json"]=function(){
            f||k.error(j+" was not called");
            return f[0]
            };
            
        b.dataTypes[0]="json";
        return"script"
        }
    });
k.ajaxSetup({
    accepts:{
        script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
    },
    contents:{
        script:/javascript|ecmascript/
    },
    converters:{
        "text script":function(b){
            k.globalEval(b);
            return b
            }
        }
});
k.ajaxPrefilter("script",function(b){
    b.cache===c&&(b.cache=!1);
    b.crossDomain&&(b.type="GET",b.global=!1)
    });
k.ajaxTransport("script",function(b){
    if(b.crossDomain){
        var e,f=t.head||t.getElementsByTagName("head")[0]||t.documentElement;
        return{
            send:function(d,j){
                e=t.createElement("script");
                e.async="async";
                b.scriptCharset&&(e.charset=b.scriptCharset);
                e.src=b.url;
                e.onload=e.onreadystatechange=function(b,d){
                    if(d||!e.readyState||/loaded|complete/.test(e.readyState))e.onload=e.onreadystatechange=null,f&&e.parentNode&&f.removeChild(e),e=c,d||j(200,"success")
                        };
                        
                f.insertBefore(e,f.firstChild)
                },
            abort:function(){
                if(e)e.onload(0,1)
                    }
                }
    }
});
var Pa=d.ActiveXObject?function(){
    for(var b in vb)vb[b](0,1)
        }:!1,xb=0,vb;
k.ajaxSettings.xhr=d.ActiveXObject?function(){
    var b;
    if(!(b=!this.isLocal&&P()))a:{
        try{
            b=
            new d.ActiveXObject("Microsoft.XMLHTTP");
            break a
        }catch(c){}
        b=void 0
        }
        return b
    }:P;
(function(b){
    k.extend(k.support,{
        ajax:!!b,
        cors:!!b&&"withCredentials"in b
        })
    })(k.ajaxSettings.xhr());
k.support.ajax&&k.ajaxTransport(function(b){
    if(!b.crossDomain||k.support.cors){
        var e;
        return{
            send:function(f,j){
                var g=b.xhr(),h,l;
                b.username?g.open(b.type,b.url,b.async,b.username,b.password):g.open(b.type,b.url,b.async);
                if(b.xhrFields)for(l in b.xhrFields)g[l]=b.xhrFields[l];b.mimeType&&g.overrideMimeType&&g.overrideMimeType(b.mimeType);
                !b.crossDomain&&!f["X-Requested-With"]&&(f["X-Requested-With"]="XMLHttpRequest");
                try{
                    for(l in f)g.setRequestHeader(l,f[l])
                        }catch(s){}
                g.send(b.hasContent&&b.data||null);
                e=function(f,d){
                    var l,s,o,q,x;
                    try{
                        if(e&&(d||4===g.readyState))if(e=c,h&&(g.onreadystatechange=k.noop,Pa&&delete vb[h]),d)4!==g.readyState&&g.abort();
                            else{
                            l=g.status;
                            o=g.getAllResponseHeaders();
                            q={};
                            
                            if((x=g.responseXML)&&x.documentElement)q.xml=x;
                            try{
                                q.text=g.responseText
                                }catch(B){}
                            try{
                                s=g.statusText
                                }catch(A){
                                s=""
                                }!l&&b.isLocal&&!b.crossDomain?
                            l=q.text?200:404:1223===l&&(l=204)
                            }
                        }catch(i){
                    d||j(-1,i)
                    }
                    q&&j(l,s,q,o)
                };
            !b.async||4===g.readyState?e():(h=++xb,Pa&&(vb||(vb={},k(d).unload(Pa)),vb[h]=e),g.onreadystatechange=e)
            },
        abort:function(){
            e&&e(0,1)
            }
        }
}
});
var Ta={},za,tb,yb=/^(?:toggle|show|hide)$/,zb=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,Ga,Ha=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],Ia;
k.fn.extend({
    show:function(b,c,e){
        if(b||0===b)return this.animate(n("show",
            3),b,c,e);
        for(var e=0,f=this.length;e<f;e++)b=this[e],b.style&&(c=b.style.display,!k._data(b,"olddisplay")&&"none"===c&&(c=b.style.display=""),(""===c&&"none"===k.css(b,"display")||!k.contains(b.ownerDocument.documentElement,b))&&k._data(b,"olddisplay",v(b.nodeName)));
        for(e=0;e<f;e++)if(b=this[e],b.style&&(c=b.style.display,""===c||"none"===c))b.style.display=k._data(b,"olddisplay")||"";return this
        },
    hide:function(b,c,e){
        if(b||0===b)return this.animate(n("hide",3),b,c,e);
        for(var e=0,f=this.length;e<
            f;e++)b=this[e],b.style&&(c=k.css(b,"display"),"none"!==c&&!k._data(b,"olddisplay")&&k._data(b,"olddisplay",c));
        for(e=0;e<f;e++)this[e].style&&(this[e].style.display="none");
        return this
        },
    _toggle:k.fn.toggle,
    toggle:function(b,c,e){
        var f="boolean"===typeof b;
        k.isFunction(b)&&k.isFunction(c)?this._toggle.apply(this,arguments):null==b||f?this.each(function(){
            var c=f?b:k(this).is(":hidden");
            k(this)[c?"show":"hide"]()
            }):this.animate(n("toggle",3),b,c,e);
        return this
        },
    fadeTo:function(b,c,e,f){
        return this.filter(":hidden").css("opacity",
            0).show().end().animate({
            opacity:c
        },b,e,f)
        },
    animate:function(b,c,e,f){
        function d(){
            !1===j.queue&&k._mark(this);
            var c=k.extend({},j),e=1===this.nodeType,f=e&&k(this).is(":hidden"),g,h,l,s,o;
            c.animatedProperties={};
            
            for(l in b)if(g=k.camelCase(l),l!==g&&(b[g]=b[l],delete b[l]),(h=k.cssHooks[g])&&"expand"in h)for(l in s=h.expand(b[g]),delete b[g],s)l in b||(b[l]=s[l]);for(g in b){
                h=b[g];
                k.isArray(h)?(c.animatedProperties[g]=h[1],h=b[g]=h[0]):c.animatedProperties[g]=c.specialEasing&&c.specialEasing[g]||
                c.easing||"swing";
                if("hide"===h&&f||"show"===h&&!f)return c.complete.call(this);
                if(e&&("height"===g||"width"===g))c.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY],"inline"===k.css(this,"display")&&"none"===k.css(this,"float")&&(!k.support.inlineBlockNeedsLayout||"inline"===v(this.nodeName)?this.style.display="inline-block":this.style.zoom=1)
                    }
                    null!=c.overflow&&(this.style.overflow="hidden");
            for(l in b)if(e=new k.fx(this,c,l),h=b[l],yb.test(h))if(g=k._data(this,"toggle"+l)||
                ("toggle"===h?f?"show":"hide":0))k._data(this,"toggle"+l,"show"===g?"hide":"show"),e[g]();else e[h]();else g=zb.exec(h),s=e.cur(),g?(h=parseFloat(g[2]),o=g[3]||(k.cssNumber[l]?"":"px"),"px"!==o&&(k.style(this,l,(h||1)+o),s*=(h||1)/e.cur(),k.style(this,l,s+o)),g[1]&&(h=("-="===g[1]?-1:1)*h+s),e.custom(s,h,o)):e.custom(s,h,"");return!0
            }
            var j=k.speed(c,e,f);
        if(k.isEmptyObject(b))return this.each(j.complete,[!1]);
        b=k.extend({},b);
        return!1===j.queue?this.each(d):this.queue(j.queue,d)
        },
    stop:function(b,
        e,f){
        "string"!==typeof b&&(f=e,e=b,b=c);
        e&&!1!==b&&this.queue(b||"fx",[]);
        return this.each(function(){
            var c,e=!1,d=k.timers,j=k._data(this);
            f||k._unmark(!0,this);
            if(null==b)for(c in j){
                if(j[c]&&j[c].stop&&c.indexOf(".run")===c.length-4){
                    var g=j[c];
                    k.removeData(this,c,!0);
                    g.stop(f)
                    }
                }else if(j[c=b+".run"]&&j[c].stop)j=j[c],k.removeData(this,c,!0),j.stop(f);
            for(c=d.length;c--;)if(d[c].elem===this&&(null==b||d[c].queue===b)){
            if(f)d[c](!0);else d[c].saveState();
            e=!0;
            d.splice(c,1)
            }(!f||!e)&&k.dequeue(this,
            b)
        })
    }
});
k.each({
    slideDown:n("show",1),
    slideUp:n("hide",1),
    slideToggle:n("toggle",1),
    fadeIn:{
        opacity:"show"
    },
    fadeOut:{
        opacity:"hide"
    },
    fadeToggle:{
        opacity:"toggle"
    }
},function(b,c){
    k.fn[b]=function(b,e,f){
        return this.animate(c,b,e,f)
        }
    });
k.extend({
    speed:function(b,c,e){
        var f=b&&"object"===typeof b?k.extend({},b):{
            complete:e||!e&&c||k.isFunction(b)&&b,
            duration:b,
            easing:e&&c||c&&!k.isFunction(c)&&c
            };
            
        f.duration=k.fx.off?0:"number"===typeof f.duration?f.duration:f.duration in k.fx.speeds?k.fx.speeds[f.duration]:
        k.fx.speeds._default;
        if(null==f.queue||!0===f.queue)f.queue="fx";
        f.old=f.complete;
        f.complete=function(b){
            k.isFunction(f.old)&&f.old.call(this);
            f.queue?k.dequeue(this,f.queue):!1!==b&&k._unmark(this)
            };
            
        return f
        },
    easing:{
        linear:function(b){
            return b
            },
        swing:function(b){
            return-Math.cos(b*Math.PI)/2+0.5
            }
        },
timers:[],
fx:function(b,c,e){
    this.options=c;
    this.elem=b;
    this.prop=e;
    c.orig=c.orig||{}
}
});
k.fx.prototype={
    update:function(){
        this.options.step&&this.options.step.call(this.elem,this.now,this);
        (k.fx.step[this.prop]||
            k.fx.step._default)(this)
        },
    cur:function(){
        if(null!=this.elem[this.prop]&&(!this.elem.style||null==this.elem.style[this.prop]))return this.elem[this.prop];
        var b,c=k.css(this.elem,this.prop);
        return isNaN(b=parseFloat(c))?!c||"auto"===c?0:c:b
        },
    custom:function(b,e,f){
        function d(b){
            return j.step(b)
            }
            var j=this,g=k.fx;
        this.startTime=Ia||w();
        this.end=e;
        this.now=this.start=b;
        this.pos=this.state=0;
        this.unit=f||this.unit||(k.cssNumber[this.prop]?"":"px");
        d.queue=this.options.queue;
        d.elem=this.elem;
        d.saveState=
        function(){
            k._data(j.elem,"fxshow"+j.prop)===c&&(j.options.hide?k._data(j.elem,"fxshow"+j.prop,j.start):j.options.show&&k._data(j.elem,"fxshow"+j.prop,j.end))
            };
            
        d()&&k.timers.push(d)&&!Ga&&(Ga=setInterval(g.tick,g.interval))
        },
    show:function(){
        var b=k._data(this.elem,"fxshow"+this.prop);
        this.options.orig[this.prop]=b||k.style(this.elem,this.prop);
        this.options.show=!0;
        b!==c?this.custom(this.cur(),b):this.custom("width"===this.prop||"height"===this.prop?1:0,this.cur());
        k(this.elem).show()
        },
    hide:function(){
        this.options.orig[this.prop]=
        k._data(this.elem,"fxshow"+this.prop)||k.style(this.elem,this.prop);
        this.options.hide=!0;
        this.custom(this.cur(),0)
        },
    step:function(b){
        var c,e=Ia||w(),f=!0,d=this.elem,j=this.options;
        if(b||e>=j.duration+this.startTime){
            this.now=this.end;
            this.pos=this.state=1;
            this.update();
            j.animatedProperties[this.prop]=!0;
            for(c in j.animatedProperties)!0!==j.animatedProperties[c]&&(f=!1);if(f){
                null!=j.overflow&&!k.support.shrinkWrapBlocks&&k.each(["","X","Y"],function(b,c){
                    d.style["overflow"+c]=j.overflow[b]
                    });
                j.hide&&
                k(d).hide();
                if(j.hide||j.show)for(c in j.animatedProperties)k.style(d,c,j.orig[c]),k.removeData(d,"fxshow"+c,!0),k.removeData(d,"toggle"+c,!0);if(b=j.complete)j.complete=!1,b.call(d)
                    }
                    return!1
            }
            Infinity==j.duration?this.now=e:(b=e-this.startTime,this.state=b/j.duration,this.pos=k.easing[j.animatedProperties[this.prop]](this.state,b,0,1,j.duration),this.now=this.start+(this.end-this.start)*this.pos);
        this.update();
        return!0
        }
    };

k.extend(k.fx,{
    tick:function(){
        for(var b,c=k.timers,e=0;e<c.length;e++)b=c[e],
            !b()&&c[e]===b&&c.splice(e--,1);
        c.length||k.fx.stop()
        },
    interval:13,
    stop:function(){
        clearInterval(Ga);
        Ga=null
        },
    speeds:{
        slow:600,
        fast:200,
        _default:400
    },
    step:{
        opacity:function(b){
            k.style(b.elem,"opacity",b.now)
            },
        _default:function(b){
            b.elem.style&&null!=b.elem.style[b.prop]?b.elem.style[b.prop]=b.now+b.unit:b.elem[b.prop]=b.now
            }
        }
});
k.each(Ha.concat.apply([],Ha),function(b,c){
    c.indexOf("margin")&&(k.fx.step[c]=function(b){
        k.style(b.elem,c,Math.max(0,b.now)+b.unit)
        })
    });
k.expr&&k.expr.filters&&(k.expr.filters.animated=
    function(b){
        return k.grep(k.timers,function(c){
            return b===c.elem
            }).length
        });
var ob,Ab=/^t(?:able|d|h)$/i,qb=/^(?:body|html)$/i;
ob="getBoundingClientRect"in t.documentElement?function(b,c,e,f){
    try{
        f=b.getBoundingClientRect()
        }catch(d){}
    if(!f||!k.contains(e,b))return f?{
        top:f.top,
        left:f.left
        }:{
        top:0,
        left:0
    };
    
    b=c.body;
    c=u(c);
    return{
        top:f.top+(c.pageYOffset||k.support.boxModel&&e.scrollTop||b.scrollTop)-(e.clientTop||b.clientTop||0),
        left:f.left+(c.pageXOffset||k.support.boxModel&&e.scrollLeft||b.scrollLeft)-
        (e.clientLeft||b.clientLeft||0)
        }
    }:function(b,c,e){
    var f,d=b.offsetParent,j=c.body;
    f=(c=c.defaultView)?c.getComputedStyle(b,null):b.currentStyle;
    for(var g=b.offsetTop,h=b.offsetLeft;(b=b.parentNode)&&b!==j&&b!==e&&!(k.support.fixedPosition&&"fixed"===f.position);){
        f=c?c.getComputedStyle(b,null):b.currentStyle;
        g-=b.scrollTop;
        h-=b.scrollLeft;
        if(b===d){
            g+=b.offsetTop;
            h+=b.offsetLeft;
            if(k.support.doesNotAddBorder&&(!k.support.doesAddBorderForTableAndCells||!Ab.test(b.nodeName)))g+=parseFloat(f.borderTopWidth)||
                0,h+=parseFloat(f.borderLeftWidth)||0;
            d=b.offsetParent
            }
            k.support.subtractsBorderForOverflowNotVisible&&"visible"!==f.overflow&&(g+=parseFloat(f.borderTopWidth)||0,h+=parseFloat(f.borderLeftWidth)||0)
        }
        if("relative"===f.position||"static"===f.position)g+=j.offsetTop,h+=j.offsetLeft;
    k.support.fixedPosition&&"fixed"===f.position&&(g+=Math.max(e.scrollTop,j.scrollTop),h+=Math.max(e.scrollLeft,j.scrollLeft));
    return{
        top:g,
        left:h
    }
};

k.fn.offset=function(b){
    if(arguments.length)return b===c?this:this.each(function(c){
        k.offset.setOffset(this,
            b,c)
        });
    var e=this[0],f=e&&e.ownerDocument;
    return!f?null:e===f.body?k.offset.bodyOffset(e):ob(e,f,f.documentElement)
    };
    
k.offset={
    bodyOffset:function(b){
        var c=b.offsetTop,e=b.offsetLeft;
        k.support.doesNotIncludeMarginInBodyOffset&&(c+=parseFloat(k.css(b,"marginTop"))||0,e+=parseFloat(k.css(b,"marginLeft"))||0);
        return{
            top:c,
            left:e
        }
    },
setOffset:function(b,c,e){
    var f=k.css(b,"position");
    "static"===f&&(b.style.position="relative");
    var d=k(b),j=d.offset(),g=k.css(b,"top"),h=k.css(b,"left"),l={},s={};
    ("absolute"===
        f||"fixed"===f)&&-1<k.inArray("auto",[g,h])?(s=d.position(),f=s.top,h=s.left):(f=parseFloat(g)||0,h=parseFloat(h)||0);
    k.isFunction(c)&&(c=c.call(b,e,j));
    null!=c.top&&(l.top=c.top-j.top+f);
    null!=c.left&&(l.left=c.left-j.left+h);
    "using"in c?c.using.call(b,l):d.css(l)
    }
};

k.fn.extend({
    position:function(){
        if(!this[0])return null;
        var b=this[0],c=this.offsetParent(),e=this.offset(),f=qb.test(c[0].nodeName)?{
            top:0,
            left:0
        }:c.offset();
        e.top-=parseFloat(k.css(b,"marginTop"))||0;
        e.left-=parseFloat(k.css(b,"marginLeft"))||
        0;
        f.top+=parseFloat(k.css(c[0],"borderTopWidth"))||0;
        f.left+=parseFloat(k.css(c[0],"borderLeftWidth"))||0;
        return{
            top:e.top-f.top,
            left:e.left-f.left
            }
        },
offsetParent:function(){
    return this.map(function(){
        for(var b=this.offsetParent||t.body;b&&!qb.test(b.nodeName)&&"static"===k.css(b,"position");)b=b.offsetParent;
        return b
        })
    }
});
k.each({
    scrollLeft:"pageXOffset",
    scrollTop:"pageYOffset"
},function(b,e){
    var f=/Y/.test(e);
    k.fn[b]=function(d){
        return k.access(this,function(b,d,j){
            var g=u(b);
            if(j===c)return g?
                e in g?g[e]:k.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:b[d];
            g?g.scrollTo(!f?j:k(g).scrollLeft(),f?j:k(g).scrollTop()):b[d]=j
            },b,d,arguments.length,null)
        }
    });
k.each({
    Height:"height",
    Width:"width"
},function(b,e){
    var f="client"+b,d="scroll"+b,j="offset"+b;
    k.fn["inner"+b]=function(){
        var b=this[0];
        return b?b.style?parseFloat(k.css(b,e,"padding")):this[e]():null
        };
        
    k.fn["outer"+b]=function(b){
        var c=this[0];
        return c?c.style?parseFloat(k.css(c,e,b?"margin":"border")):this[e]():null
        };
    k.fn[e]=function(b){
        return k.access(this,function(b,e,g){
            if(k.isWindow(b))return e=b.document,b=e.documentElement[f],k.support.boxModel&&b||e.body&&e.body[f]||b;
            if(9===b.nodeType)return e=b.documentElement,e[f]>=e[d]?e[f]:Math.max(b.body[d],e[d],b.body[j],e[j]);
            if(g===c)return b=k.css(b,e),e=parseFloat(b),k.isNumeric(e)?e:b;
            k(b).css(e,g)
            },e,b,arguments.length,null)
        }
    });
d.jQuery=d.$=k;
"function"===typeof define&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){
    return k
    })
}(y);
C("jquery.ui.core")&&
function(d,c){
    function b(b,c){
        var h=b.nodeName.toLowerCase();
        if("area"===h){
            var h=b.parentNode,j=h.name;
            if(!b.href||!j||"map"!==h.nodeName.toLowerCase())return!1;
            h=d("img[usemap=#"+j+"]")[0];
            return!!h&&e(h)
            }
            return(/input|select|textarea|button|object/.test(h)?!b.disabled:"a"==h?b.href||c:c)&&e(b)
        }
        function e(b){
        return!d(b).parents().andSelf().filter(function(){
            return"hidden"===d.curCSS(this,"visibility")||d.expr.filters.hidden(this)
            }).length
        }
        d.ui=d.ui||{};
    
    d.ui.version||(d.extend(d.ui,{
        version:"1.8.14",
        keyCode:{
            ALT:18,
            BACKSPACE:8,
            CAPS_LOCK:20,
            COMMA:188,
            COMMAND:91,
            COMMAND_LEFT:91,
            COMMAND_RIGHT:93,
            CONTROL:17,
            DELETE:46,
            DOWN:40,
            END:35,
            ENTER:13,
            ESCAPE:27,
            HOME:36,
            INSERT:45,
            LEFT:37,
            MENU:93,
            NUMPAD_ADD:107,
            NUMPAD_DECIMAL:110,
            NUMPAD_DIVIDE:111,
            NUMPAD_ENTER:108,
            NUMPAD_MULTIPLY:106,
            NUMPAD_SUBTRACT:109,
            PAGE_DOWN:34,
            PAGE_UP:33,
            PERIOD:190,
            RIGHT:39,
            SHIFT:16,
            SPACE:32,
            TAB:9,
            UP:38,
            WINDOWS:91
        }
    }),d.fn.extend({
        _focus:d.fn.focus,
        focus:function(b,c){
            return"number"===typeof b?this.each(function(){
                var e=this;
                setTimeout(function(){
                    d(e).focus();
                    c&&c.call(e)
                    },b)
                }):this._focus.apply(this,arguments)
            },
        scrollParent:function(){
            var b;
            b=d.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){
                return/(relative|absolute|fixed)/.test(d.curCSS(this,"position",1))&&/(auto|scroll)/.test(d.curCSS(this,"overflow",1)+d.curCSS(this,"overflow-y",1)+d.curCSS(this,"overflow-x",1))
                }).eq(0):this.parents().filter(function(){
                return/(auto|scroll)/.test(d.curCSS(this,"overflow",1)+d.curCSS(this,
                    "overflow-y",1)+d.curCSS(this,"overflow-x",1))
                }).eq(0);
            return/fixed/.test(this.css("position"))||!b.length?d(document):b
            },
        zIndex:function(b){
            if(b!==c)return this.css("zIndex",b);
            if(this.length)for(var b=d(this[0]),e;b.length&&b[0]!==document;){
                e=b.css("position");
                if("absolute"===e||"relative"===e||"fixed"===e)if(e=parseInt(b.css("zIndex"),10),!isNaN(e)&&0!==e)return e;
                b=b.parent()
                }
                return 0
            },
        disableSelection:function(){
            return this.bind((d.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",
                function(b){
                    b.preventDefault()
                    })
            },
        enableSelection:function(){
            return this.unbind(".ui-disableSelection")
            }
        }),d.each(["Width","Height"],function(b,e){
    function h(b,c,e,f){
        d.each(j,function(){
            c-=parseFloat(d.curCSS(b,"padding"+this,!0))||0;
            e&&(c-=parseFloat(d.curCSS(b,"border"+this+"Width",!0))||0);
            f&&(c-=parseFloat(d.curCSS(b,"margin"+this,!0))||0)
            });
        return c
        }
        var j="Width"===e?["Left","Right"]:["Top","Bottom"],l=e.toLowerCase(),o={
        innerWidth:d.fn.innerWidth,
        innerHeight:d.fn.innerHeight,
        outerWidth:d.fn.outerWidth,
        outerHeight:d.fn.outerHeight
        };
        
    d.fn["inner"+e]=function(b){
        return b===c?o["inner"+e].call(this):this.each(function(){
            d(this).css(l,h(this,b)+"px")
            })
        };
        
    d.fn["outer"+e]=function(b,c){
        return"number"!==typeof b?o["outer"+e].call(this,b):this.each(function(){
            d(this).css(l,h(this,b,!0,c)+"px")
            })
        }
    }),d.extend(d.expr[":"],{
    data:function(b,c,e){
        return!!d.data(b,e[3])
        },
    focusable:function(c){
        return b(c,!isNaN(d.attr(c,"tabindex")))
        },
    tabbable:function(c){
        var e=d.attr(c,"tabindex"),h=isNaN(e);
        return(h||0<=e)&&b(c,
            !h)
        }
    }),d(function(){
    var b=document.body,c=b.appendChild(c=document.createElement("div"));
    d.extend(c.style,{
        minHeight:"100px",
        height:"auto",
        padding:0,
        borderWidth:0
    });
    d.support.minHeight=100===c.offsetHeight;
    d.support.selectstart="onselectstart"in c;
    b.removeChild(c).style.display="none"
    }),d.extend(d.ui,{
    plugin:{
        add:function(b,c,e){
            var b=d.ui[b].prototype,j;
            for(j in e)b.plugins[j]=b.plugins[j]||[],b.plugins[j].push([c,e[j]])
                },
        call:function(b,c,e){
            if((c=b.plugins[c])&&b.element[0].parentNode)for(var d=
                0;d<c.length;d++)b.options[c[d][0]]&&c[d][1].apply(b.element,e)
                }
            },
contains:function(b,c){
    return document.compareDocumentPosition?b.compareDocumentPosition(c)&16:b!==c&&b.contains(c)
    },
hasScroll:function(b,c){
    if("hidden"===d(b).css("overflow"))return!1;
    var e=c&&"left"===c?"scrollLeft":"scrollTop",j=!1;
    if(0<b[e])return!0;
    b[e]=1;
    j=0<b[e];
    b[e]=0;
    return j
    },
isOverAxis:function(b,c,e){
    return b>c&&b<c+e
    },
isOver:function(b,c,e,j,l,o){
    return d.ui.isOverAxis(b,e,l)&&d.ui.isOverAxis(c,j,o)
    }
}))
}(jQuery);
C("jquery.ui.widget")&&
function(d,c){
    if(d.cleanData){
        var b=d.cleanData;
        d.cleanData=function(c){
            for(var e=0,h;null!=(h=c[e]);e++)d(h).triggerHandler("remove");
            b(c)
            }
        }else{
    var e=d.fn.remove;
    d.fn.remove=function(b,c){
        return this.each(function(){
            c||(!b||d.filter(b,[this]).length)&&d("*",this).add([this]).each(function(){
                d(this).triggerHandler("remove")
                });
            return e.call(d(this),b,c)
            })
        }
    }
d.widget=function(b,c,e){
    var j=b.split(".")[0],l,b=b.split(".")[1];
    l=j+"-"+b;
    e||(e=c,c=d.Widget);
    d.expr[":"][l]=function(c){
        return!!d.data(c,b)
        };
    d[j]=d[j]||{};
    
    d[j][b]=function(b,c){
        arguments.length&&this._createWidget(b,c)
        };
        
    c=new c;
    c.options=d.extend(!0,{},c.options);
    d[j][b].prototype=d.extend(!0,c,{
        namespace:j,
        widgetName:b,
        widgetEventPrefix:d[j][b].prototype.widgetEventPrefix||b,
        widgetBaseClass:l
    },e);
    d.widget.bridge(b,d[j][b])
    };
    
d.widget.bridge=function(b,e){
    d.fn[b]=function(h){
        var j="string"===typeof h,l=Array.prototype.slice.call(arguments,1),o=this,h=!j&&l.length?d.extend.apply(null,[!0,h].concat(l)):h;
        if(j&&"_"===h.charAt(0))return o;
        j?this.each(function(){
            var e=d.data(this,b),j=e&&d.isFunction(e[h])?e[h].apply(e,l):e;
            if(j!==e&&j!==c)return o=j,!1
                }):this.each(function(){
            var c=d.data(this,b);
            c?c.option(h||{})._init():d.data(this,b,new e(h,this))
            });
        return o
        }
    };

d.Widget=function(b,c){
    arguments.length&&this._createWidget(b,c)
    };
    
d.Widget.prototype={
    widgetName:"widget",
    widgetEventPrefix:"",
    options:{
        disabled:!1
        },
    _createWidget:function(b,c){
        d.data(c,this.widgetName,this);
        this.element=d(c);
        this.options=d.extend(!0,{},this.options,this._getCreateOptions(),
            b);
        var e=this;
        this.element.bind("remove."+this.widgetName,function(){
            e.destroy()
            });
        this._create();
        this._trigger("create");
        this._init()
        },
    _getCreateOptions:function(){
        return d.metadata&&d.metadata.get(this.element[0])[this.widgetName]
        },
    _create:function(){},
    _init:function(){},
    destroy:function(){
        this.element.unbind("."+this.widgetName).removeData(this.widgetName);
        this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled ui-state-disabled")
        },
    widget:function(){
        return this.element
        },
    option:function(b,e){
        var h=b;
        if(0===arguments.length)return d.extend({},this.options);
        if("string"===typeof b){
            if(e===c)return this.options[b];
            h={};
            
            h[b]=e
            }
            this._setOptions(h);
        return this
        },
    _setOptions:function(b){
        var c=this;
        d.each(b,function(b,e){
            c._setOption(b,e)
            });
        return this
        },
    _setOption:function(b,c){
        this.options[b]=c;
        "disabled"===b&&this.widget()[c?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",c);
        return this
        },
    enable:function(){
        return this._setOption("disabled",
            !1)
        },
    disable:function(){
        return this._setOption("disabled",!0)
        },
    _trigger:function(b,c,e){
        var j=this.options[b],c=d.Event(c);
        c.type=(b===this.widgetEventPrefix?b:this.widgetEventPrefix+b).toLowerCase();
        e=e||{};
        
        if(c.originalEvent)for(var b=d.event.props.length,l;b;)l=d.event.props[--b],c[l]=c.originalEvent[l];
        this.element.trigger(c,e);
        return!(d.isFunction(j)&&!1===j.call(this.element[0],c,e)||c.isDefaultPrevented())
        }
    }
}(jQuery);
C("jquery.ui.mouse")&&function(d){
    d.widget("ui.mouse",{
        options:{
            cancel:":input,option",
            distance:1,
            delay:0
        },
        _mouseInit:function(){
            var c=this;
            this.element.bind("mousedown."+this.widgetName,function(b){
                return c._mouseDown(b)
                }).bind("click."+this.widgetName,function(b){
                if(!0===d.data(b.target,c.widgetName+".preventClickEvent"))return d.removeData(b.target,c.widgetName+".preventClickEvent"),b.stopImmediatePropagation(),!1
                    });
            this.started=!1
            },
        _mouseDestroy:function(){
            this.element.unbind("."+this.widgetName)
            },
        _mouseDown:function(c){
            c.originalEvent=c.originalEvent||{};
            
            if(!c.originalEvent.mouseHandled){
                this._mouseStarted&&
                this._mouseUp(c);
                this._mouseDownEvent=c;
                var b=this,e=1==c.which,f="string"==typeof this.options.cancel?d(c.target).closest(this.options.cancel).length:!1;
                if(!e||f||!this._mouseCapture(c))return!0;
                this.mouseDelayMet=!this.options.delay;
                this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){
                    b.mouseDelayMet=!0
                    },this.options.delay));
                if(this._mouseDistanceMet(c)&&this._mouseDelayMet(c)&&(this._mouseStarted=!1!==this._mouseStart(c),!this._mouseStarted))return c.preventDefault(),!0;
                !0===d.data(c.target,
                    this.widgetName+".preventClickEvent")&&d.removeData(c.target,this.widgetName+".preventClickEvent");
                this._mouseMoveDelegate=function(c){
                    return b._mouseMove(c)
                    };
                    
                this._mouseUpDelegate=function(c){
                    return b._mouseUp(c)
                    };
                    
                d(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);
                c.preventDefault();
                return c.originalEvent.mouseHandled=!0
                }
            },
    _mouseMove:function(c){
        if(d.browser.msie&&!(9<=document.documentMode)&&!c.button)return this._mouseUp(c);
        if(this._mouseStarted)return this._mouseDrag(c),c.preventDefault();
        this._mouseDistanceMet(c)&&this._mouseDelayMet(c)&&((this._mouseStarted=!1!==this._mouseStart(this._mouseDownEvent,c))?this._mouseDrag(c):this._mouseUp(c));
        return!this._mouseStarted
        },
    _mouseUp:function(c){
        d(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);
        this._mouseStarted&&(this._mouseStarted=!1,c.target==this._mouseDownEvent.target&&d.data(c.target,this.widgetName+
            ".preventClickEvent",!0),this._mouseStop(c));
        return!1
        },
    _mouseDistanceMet:function(c){
        return Math.max(Math.abs(this._mouseDownEvent.pageX-c.pageX),Math.abs(this._mouseDownEvent.pageY-c.pageY))>=this.options.distance
        },
    _mouseDelayMet:function(){
        return this.mouseDelayMet
        },
    _mouseStart:function(){},
        _mouseDrag:function(){},
        _mouseStop:function(){},
        _mouseCapture:function(){
        return!0
        }
    })
}(jQuery);
C("jquery.ui.position")&&function(d){
    d.ui=d.ui||{};
    
    var c=/left|center|right/,b=/top|center|bottom/,e=d.fn.position,
    f=d.fn.offset;
    d.fn.position=function(f){
        if(!f||!f.of)return e.apply(this,arguments);
        var f=d.extend({},f),h=d(f.of),j=h[0],l=(f.collision||"flip").split(" "),o=f.offset?f.offset.split(" "):[0,0],q,A,i;
        9===j.nodeType?(q=h.width(),A=h.height(),i={
            top:0,
            left:0
        }):j.setTimeout?(q=h.width(),A=h.height(),i={
            top:h.scrollTop(),
            left:h.scrollLeft()
            }):j.preventDefault?(f.at="left top",q=A=0,i={
            top:f.of.pageY,
            left:f.of.pageX
            }):(q=h.outerWidth(),A=h.outerHeight(),i=h.offset());
        d.each(["my","at"],function(){
            var e=
            (f[this]||"").split(" ");
            1===e.length&&(e=c.test(e[0])?e.concat(["center"]):b.test(e[0])?["center"].concat(e):["center","center"]);
            e[0]=c.test(e[0])?e[0]:"center";
            e[1]=b.test(e[1])?e[1]:"center";
            f[this]=e
            });
        1===l.length&&(l[1]=l[0]);
        o[0]=parseInt(o[0],10)||0;
        1===o.length&&(o[1]=o[0]);
        o[1]=parseInt(o[1],10)||0;
        "right"===f.at[0]?i.left+=q:"center"===f.at[0]&&(i.left+=q/2);
        "bottom"===f.at[1]?i.top+=A:"center"===f.at[1]&&(i.top+=A/2);
        i.left+=o[0];
        i.top+=o[1];
        return this.each(function(){
            var b=d(this),
            c=b.outerWidth(),e=b.outerHeight(),j=parseInt(d.curCSS(this,"marginLeft",!0))||0,h=parseInt(d.curCSS(this,"marginTop",!0))||0,L=c+j+(parseInt(d.curCSS(this,"marginRight",!0))||0),M=e+h+(parseInt(d.curCSS(this,"marginBottom",!0))||0),P=d.extend({},i),w;
            "right"===f.my[0]?P.left-=c:"center"===f.my[0]&&(P.left-=c/2);
            "bottom"===f.my[1]?P.top-=e:"center"===f.my[1]&&(P.top-=e/2);
            P.left=Math.round(P.left);
            P.top=Math.round(P.top);
            w={
                left:P.left-j,
                top:P.top-h
                };
                
            d.each(["left","top"],function(b,j){
                if(d.ui.position[l[b]])d.ui.position[l[b]][j](P,

                {
                    targetWidth:q,
                    targetHeight:A,
                    elemWidth:c,
                    elemHeight:e,
                    collisionPosition:w,
                    collisionWidth:L,
                    collisionHeight:M,
                    offset:o,
                    my:f.my,
                    at:f.at
                    })
                });
            d.fn.bgiframe&&b.bgiframe();
            b.offset(d.extend(P,{
                using:f.using
                }))
            })
        };
        
    d.ui.position={
        fit:{
            left:function(b,c){
                var e=d(y),e=c.collisionPosition.left+c.collisionWidth-e.width()-e.scrollLeft();
                b.left=0<e?b.left-e:Math.max(b.left-c.collisionPosition.left,b.left)
                },
            top:function(b,c){
                var e=d(y),e=c.collisionPosition.top+c.collisionHeight-e.height()-e.scrollTop();
                b.top=
                0<e?b.top-e:Math.max(b.top-c.collisionPosition.top,b.top)
                }
            },
    flip:{
        left:function(b,c){
            if("center"!==c.at[0]){
                var e=d(y),e=c.collisionPosition.left+c.collisionWidth-e.width()-e.scrollLeft(),f="left"===c.my[0]?-c.elemWidth:"right"===c.my[0]?c.elemWidth:0,o="left"===c.at[0]?c.targetWidth:-c.targetWidth,q=-2*c.offset[0];
                b.left+=0>c.collisionPosition.left?f+o+q:0<e?f+o+q:0
                }
            },
    top:function(b,c){
        if("center"!==c.at[1]){
            var e=d(y),e=c.collisionPosition.top+c.collisionHeight-e.height()-e.scrollTop(),f="top"===
            c.my[1]?-c.elemHeight:"bottom"===c.my[1]?c.elemHeight:0,o="top"===c.at[1]?c.targetHeight:-c.targetHeight,q=-2*c.offset[1];
            b.top+=0>c.collisionPosition.top?f+o+q:0<e?f+o+q:0
            }
        }
}
};

d.offset.setOffset||(d.offset.setOffset=function(b,c){
    /static/.test(d.curCSS(b,"position"))&&(b.style.position="relative");
    var e=d(b),f=e.offset(),o=parseInt(d.curCSS(b,"top",!0),10)||0,q=parseInt(d.curCSS(b,"left",!0),10)||0,f={
        top:c.top-f.top+o,
        left:c.left-f.left+q
        };
        
    "using"in c?c.using.call(b,f):e.css(f)
    },d.fn.offset=function(b){
    var c=
    this[0];
    return!c||!c.ownerDocument?null:b?this.each(function(){
        d.offset.setOffset(this,b)
        }):f.call(this)
    })
}(jQuery);
C("jquery.ui.draggable")&&function(d){
    d.widget("ui.draggable",d.ui.mouse,{
        widgetEventPrefix:"drag",
        options:{
            addClasses:!0,
            appendTo:"parent",
            axis:!1,
            connectToSortable:!1,
            containment:!1,
            cursor:"auto",
            cursorAt:!1,
            grid:!1,
            handle:!1,
            helper:"original",
            iframeFix:!1,
            opacity:!1,
            refreshPositions:!1,
            revert:!1,
            revertDuration:500,
            scope:"default",
            scroll:!0,
            scrollSensitivity:20,
            scrollSpeed:20,
            snap:!1,
            snapMode:"both",
            snapTolerance:20,
            stack:!1,
            zIndex:!1
            },
        _create:function(){
            "original"==this.options.helper&&!/^(?:r|a|f)/.test(this.element.css("position"))&&(this.element[0].style.position="relative");
            this.options.addClasses&&this.element.addClass("ui-draggable");
            this.options.disabled&&this.element.addClass("ui-draggable-disabled");
            this._mouseInit()
            },
        destroy:function(){
            if(this.element.data("draggable"))return this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),
                this._mouseDestroy(),this
                },
        _mouseCapture:function(c){
            var b=this.options;
            if(this.helper||b.disabled||d(c.target).is(".ui-resizable-handle"))return!1;
            this.handle=this._getHandle(c);
            if(!this.handle)return!1;
            d(!0===b.iframeFix?"iframe":b.iframeFix).each(function(){
                d('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({
                    width:this.offsetWidth+"px",
                    height:this.offsetHeight+"px",
                    position:"absolute",
                    opacity:"0.001",
                    zIndex:1E3
                }).css(d(this).offset()).appendTo("body")
                });
            return!0
            },
        _mouseStart:function(c){
            var b=
            this.options;
            this.helper=this._createHelper(c);
            this._cacheHelperProportions();
            d.ui.ddmanager&&(d.ui.ddmanager.current=this);
            this._cacheMargins();
            this.cssPosition=this.helper.css("position");
            this.scrollParent=this.helper.scrollParent();
            this.offset=this.positionAbs=this.element.offset();
            this.offset={
                top:this.offset.top-this.margins.top,
                left:this.offset.left-this.margins.left
                };
                
            d.extend(this.offset,{
                click:{
                    left:c.pageX-this.offset.left,
                    top:c.pageY-this.offset.top
                    },
                parent:this._getParentOffset(),
                relative:this._getRelativeOffset()
                });
            this.originalPosition=this.position=this._generatePosition(c);
            this.originalPageX=c.pageX;
            this.originalPageY=c.pageY;
            b.cursorAt&&this._adjustOffsetFromHelper(b.cursorAt);
            b.containment&&this._setContainment();
            if(!1===this._trigger("start",c))return this._clear(),!1;
            this._cacheHelperProportions();
            d.ui.ddmanager&&!b.dropBehaviour&&d.ui.ddmanager.prepareOffsets(this,c);
            this.helper.addClass("ui-draggable-dragging");
            this._mouseDrag(c,!0);
            d.ui.ddmanager&&d.ui.ddmanager.dragStart(this,c);
            return!0
            },
        _mouseDrag:function(c,
            b){
            this.position=this._generatePosition(c);
            this.positionAbs=this._convertPositionTo("absolute");
            if(!b){
                var e=this._uiHash();
                if(!1===this._trigger("drag",c,e))return this._mouseUp({}),!1;
                this.position=e.position
                }
                if(!this.options.axis||"y"!=this.options.axis)this.helper[0].style.left=this.position.left+"px";
            if(!this.options.axis||"x"!=this.options.axis)this.helper[0].style.top=this.position.top+"px";
            d.ui.ddmanager&&d.ui.ddmanager.drag(this,c);
            return!1
            },
        _mouseStop:function(c){
            var b=!1;
            d.ui.ddmanager&&
            !this.options.dropBehaviour&&(b=d.ui.ddmanager.drop(this,c));
            this.dropped&&(b=this.dropped,this.dropped=!1);
            if((!this.element[0]||!this.element[0].parentNode)&&"original"==this.options.helper)return!1;
            if("invalid"==this.options.revert&&!b||"valid"==this.options.revert&&b||!0===this.options.revert||d.isFunction(this.options.revert)&&this.options.revert.call(this.element,b)){
                var e=this;
                d(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){
                    !1!==e._trigger("stop",
                        c)&&e._clear()
                    })
                }else!1!==this._trigger("stop",c)&&this._clear();
            return!1
            },
        _mouseUp:function(c){
            !0===this.options.iframeFix&&d("div.ui-draggable-iframeFix").each(function(){
                this.parentNode.removeChild(this)
                });
            d.ui.ddmanager&&d.ui.ddmanager.dragStop(this,c);
            return d.ui.mouse.prototype._mouseUp.call(this,c)
            },
        cancel:function(){
            this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear();
            return this
            },
        _getHandle:function(c){
            var b=!this.options.handle||!d(this.options.handle,this.element).length?
            !0:!1;
            d(this.options.handle,this.element).find("*").andSelf().each(function(){
                this==c.target&&(b=!0)
                });
            return b
            },
        _createHelper:function(c){
            var b=this.options,c=d.isFunction(b.helper)?d(b.helper.apply(this.element[0],[c])):"clone"==b.helper?this.element.clone().removeAttr("id"):this.element;
            c.parents("body").length||c.appendTo("parent"==b.appendTo?this.element[0].parentNode:b.appendTo);
            c[0]!=this.element[0]&&!/(fixed|absolute)/.test(c.css("position"))&&c.css("position","absolute");
            return c
            },
        _adjustOffsetFromHelper:function(c){
            "string"==
            typeof c&&(c=c.split(" "));
            d.isArray(c)&&(c={
                left:+c[0],
                top:+c[1]||0
                });
            "left"in c&&(this.offset.click.left=c.left+this.margins.left);
            "right"in c&&(this.offset.click.left=this.helperProportions.width-c.right+this.margins.left);
            "top"in c&&(this.offset.click.top=c.top+this.margins.top);
            "bottom"in c&&(this.offset.click.top=this.helperProportions.height-c.bottom+this.margins.top)
            },
        _getParentOffset:function(){
            this.offsetParent=this.helper.offsetParent();
            var c=this.offsetParent.offset();
            "absolute"==this.cssPosition&&
            this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0])&&(c.left+=this.scrollParent.scrollLeft(),c.top+=this.scrollParent.scrollTop());
            if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&"html"==this.offsetParent[0].tagName.toLowerCase()&&d.browser.msie)c={
                top:0,
                left:0
            };
            
            return{
                top:c.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),
                left:c.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)
                }
            },
    _getRelativeOffset:function(){
        if("relative"==
            this.cssPosition){
            var c=this.element.position();
            return{
                top:c.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),
                left:c.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()
                }
            }
        return{
        top:0,
        left:0
    }
    },
_cacheMargins:function(){
    this.margins={
        left:parseInt(this.element.css("marginLeft"),10)||0,
        top:parseInt(this.element.css("marginTop"),10)||0,
        right:parseInt(this.element.css("marginRight"),10)||0,
        bottom:parseInt(this.element.css("marginBottom"),10)||0
        }
    },
_cacheHelperProportions:function(){
    this.helperProportions=

    {
        width:this.helper.outerWidth(),
        height:this.helper.outerHeight()
        }
    },
_setContainment:function(){
    var c=this.options;
    "parent"==c.containment&&(c.containment=this.helper[0].parentNode);
    if("document"==c.containment||"window"==c.containment)this.containment=["document"==c.containment?0:d(y).scrollLeft()-this.offset.relative.left-this.offset.parent.left,"document"==c.containment?0:d(y).scrollTop()-this.offset.relative.top-this.offset.parent.top,("document"==c.containment?0:d(y).scrollLeft())+d("document"==
        c.containment?document:y).width()-this.helperProportions.width-this.margins.left,("document"==c.containment?0:d(y).scrollTop())+(d("document"==c.containment?document:y).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];
    if(!/^(document|window|parent)$/.test(c.containment)&&c.containment.constructor!=Array){
        var c=d(c.containment),b=c[0];
        if(b){
            c.offset();
            var e="hidden"!=d(b).css("overflow");
            this.containment=[(parseInt(d(b).css("borderLeftWidth"),10)||0)+
            (parseInt(d(b).css("paddingLeft"),10)||0),(parseInt(d(b).css("borderTopWidth"),10)||0)+(parseInt(d(b).css("paddingTop"),10)||0),(e?Math.max(b.scrollWidth,b.offsetWidth):b.offsetWidth)-(parseInt(d(b).css("borderLeftWidth"),10)||0)-(parseInt(d(b).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(e?Math.max(b.scrollHeight,b.offsetHeight):b.offsetHeight)-(parseInt(d(b).css("borderTopWidth"),10)||0)-(parseInt(d(b).css("paddingBottom"),10)||0)-this.helperProportions.height-
            this.margins.top-this.margins.bottom];
            this.relative_container=c
            }
        }else c.containment.constructor==Array&&(this.containment=c.containment)
    },
_convertPositionTo:function(c,b){
    b||(b=this.position);
    var e="absolute"==c?1:-1,f="absolute"==this.cssPosition&&!(this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,g=/(html|body)/i.test(f[0].tagName);
    return{
        top:b.top+this.offset.relative.top*e+this.offset.parent.top*e-(d.browser.safari&&
            526>d.browser.version&&"fixed"==this.cssPosition?0:("fixed"==this.cssPosition?-this.scrollParent.scrollTop():g?0:f.scrollTop())*e),
        left:b.left+this.offset.relative.left*e+this.offset.parent.left*e-(d.browser.safari&&526>d.browser.version&&"fixed"==this.cssPosition?0:("fixed"==this.cssPosition?-this.scrollParent.scrollLeft():g?0:f.scrollLeft())*e)
        }
    },
_generatePosition:function(c){
    var b=this.options,e="absolute"==this.cssPosition&&!(this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],
        this.offsetParent[0]))?this.offsetParent:this.scrollParent,f=/(html|body)/i.test(e[0].tagName),g=c.pageX,h=c.pageY;
    if(this.originalPosition){
        var j;
        this.containment&&(this.relative_container?(j=this.relative_container.offset(),j=[this.containment[0]+j.left,this.containment[1]+j.top,this.containment[2]+j.left,this.containment[3]+j.top]):j=this.containment,c.pageX-this.offset.click.left<j[0]&&(g=j[0]+this.offset.click.left),c.pageY-this.offset.click.top<j[1]&&(h=j[1]+this.offset.click.top),c.pageX-this.offset.click.left>
            j[2]&&(g=j[2]+this.offset.click.left),c.pageY-this.offset.click.top>j[3]&&(h=j[3]+this.offset.click.top));
        b.grid&&(h=b.grid[1]?this.originalPageY+Math.round((h-this.originalPageY)/b.grid[1])*b.grid[1]:this.originalPageY,h=j?!(h-this.offset.click.top<j[1]||h-this.offset.click.top>j[3])?h:!(h-this.offset.click.top<j[1])?h-b.grid[1]:h+b.grid[1]:h,g=b.grid[0]?this.originalPageX+Math.round((g-this.originalPageX)/b.grid[0])*b.grid[0]:this.originalPageX,g=j?!(g-this.offset.click.left<j[0]||g-this.offset.click.left>
            j[2])?g:!(g-this.offset.click.left<j[0])?g-b.grid[0]:g+b.grid[0]:g)
        }
        return{
        top:h-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(d.browser.safari&&526>d.browser.version&&"fixed"==this.cssPosition?0:"fixed"==this.cssPosition?-this.scrollParent.scrollTop():f?0:e.scrollTop()),
        left:g-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(d.browser.safari&&526>d.browser.version&&"fixed"==this.cssPosition?0:"fixed"==this.cssPosition?-this.scrollParent.scrollLeft():
            f?0:e.scrollLeft())
        }
    },
_clear:function(){
    this.helper.removeClass("ui-draggable-dragging");
    this.helper[0]!=this.element[0]&&!this.cancelHelperRemoval&&this.helper.remove();
    this.helper=null;
    this.cancelHelperRemoval=!1
    },
_trigger:function(c,b,e){
    e=e||this._uiHash();
    d.ui.plugin.call(this,c,[b,e]);
    "drag"==c&&(this.positionAbs=this._convertPositionTo("absolute"));
    return d.Widget.prototype._trigger.call(this,c,b,e)
    },
plugins:{},
_uiHash:function(){
    return{
        helper:this.helper,
        position:this.position,
        originalPosition:this.originalPosition,
        offset:this.positionAbs
        }
    }
});
d.extend(d.ui.draggable,{
    version:"1.8.14"
});
d.ui.plugin.add("draggable","connectToSortable",{
    start:function(c,b){
        var e=d(this).data("draggable"),f=e.options,g=d.extend({},b,{
            item:e.element
            });
        e.sortables=[];
        d(f.connectToSortable).each(function(){
            var b=d.data(this,"sortable");
            b&&!b.options.disabled&&(e.sortables.push({
                instance:b,
                shouldRevert:b.options.revert
                }),b.refreshPositions(),b._trigger("activate",c,g))
            })
        },
    stop:function(c,b){
        var e=d(this).data("draggable"),f=d.extend({},
            b,{
                item:e.element
                });
        d.each(e.sortables,function(){
            this.instance.isOver?(this.instance.isOver=0,e.cancelHelperRemoval=!0,this.instance.cancelHelperRemoval=!1,this.shouldRevert&&(this.instance.options.revert=!0),this.instance._mouseStop(c),this.instance.options.helper=this.instance.options._helper,"original"==e.options.helper&&this.instance.currentItem.css({
                top:"auto",
                left:"auto"
            })):(this.instance.cancelHelperRemoval=!1,this.instance._trigger("deactivate",c,f))
            })
        },
    drag:function(c,b){
        var e=d(this).data("draggable"),
        f=this;
        d.each(e.sortables,function(){
            this.instance.positionAbs=e.positionAbs;
            this.instance.helperProportions=e.helperProportions;
            this.instance.offset.click=e.offset.click;
            this.instance._intersectsWith(this.instance.containerCache)?(this.instance.isOver||(this.instance.isOver=1,this.instance.currentItem=d(f).clone().removeAttr("id").appendTo(this.instance.element).data("sortable-item",!0),this.instance.options._helper=this.instance.options.helper,this.instance.options.helper=function(){
                return b.helper[0]
                },
            c.target=this.instance.currentItem[0],this.instance._mouseCapture(c,!0),this.instance._mouseStart(c,!0,!0),this.instance.offset.click.top=e.offset.click.top,this.instance.offset.click.left=e.offset.click.left,this.instance.offset.parent.left-=e.offset.parent.left-this.instance.offset.parent.left,this.instance.offset.parent.top-=e.offset.parent.top-this.instance.offset.parent.top,e._trigger("toSortable",c),e.dropped=this.instance.element,e.currentItem=e.element,this.instance.fromOutside=e),this.instance.currentItem&&
                this.instance._mouseDrag(c)):this.instance.isOver&&(this.instance.isOver=0,this.instance.cancelHelperRemoval=!0,this.instance.options.revert=!1,this.instance._trigger("out",c,this.instance._uiHash(this.instance)),this.instance._mouseStop(c,!0),this.instance.options.helper=this.instance.options._helper,this.instance.currentItem.remove(),this.instance.placeholder&&this.instance.placeholder.remove(),e._trigger("fromSortable",c),e.dropped=!1)
            })
        }
    });
d.ui.plugin.add("draggable","cursor",{
    start:function(){
        var c=
        d("body"),b=d(this).data("draggable").options;
        c.css("cursor")&&(b._cursor=c.css("cursor"));
        c.css("cursor",b.cursor)
        },
    stop:function(){
        var c=d(this).data("draggable").options;
        c._cursor&&d("body").css("cursor",c._cursor)
        }
    });
d.ui.plugin.add("draggable","opacity",{
    start:function(c,b){
        var e=d(b.helper),f=d(this).data("draggable").options;
        e.css("opacity")&&(f._opacity=e.css("opacity"));
        e.css("opacity",f.opacity)
        },
    stop:function(c,b){
        var e=d(this).data("draggable").options;
        e._opacity&&d(b.helper).css("opacity",
            e._opacity)
        }
    });
d.ui.plugin.add("draggable","scroll",{
    start:function(){
        var c=d(this).data("draggable");
        c.scrollParent[0]!=document&&"HTML"!=c.scrollParent[0].tagName&&(c.overflowOffset=c.scrollParent.offset())
        },
    drag:function(c){
        var b=d(this).data("draggable"),e=b.options,f=!1;
        if(b.scrollParent[0]!=document&&"HTML"!=b.scrollParent[0].tagName){
            if(!e.axis||"x"!=e.axis)b.overflowOffset.top+b.scrollParent[0].offsetHeight-c.pageY<e.scrollSensitivity?b.scrollParent[0].scrollTop=f=b.scrollParent[0].scrollTop+
                e.scrollSpeed:c.pageY-b.overflowOffset.top<e.scrollSensitivity&&(b.scrollParent[0].scrollTop=f=b.scrollParent[0].scrollTop-e.scrollSpeed);
            if(!e.axis||"y"!=e.axis)b.overflowOffset.left+b.scrollParent[0].offsetWidth-c.pageX<e.scrollSensitivity?b.scrollParent[0].scrollLeft=f=b.scrollParent[0].scrollLeft+e.scrollSpeed:c.pageX-b.overflowOffset.left<e.scrollSensitivity&&(b.scrollParent[0].scrollLeft=f=b.scrollParent[0].scrollLeft-e.scrollSpeed)
                }else{
            if(!e.axis||"x"!=e.axis)c.pageY-d(document).scrollTop()<
                e.scrollSensitivity?f=d(document).scrollTop(d(document).scrollTop()-e.scrollSpeed):d(y).height()-(c.pageY-d(document).scrollTop())<e.scrollSensitivity&&(f=d(document).scrollTop(d(document).scrollTop()+e.scrollSpeed));
            if(!e.axis||"y"!=e.axis)c.pageX-d(document).scrollLeft()<e.scrollSensitivity?f=d(document).scrollLeft(d(document).scrollLeft()-e.scrollSpeed):d(y).width()-(c.pageX-d(document).scrollLeft())<e.scrollSensitivity&&(f=d(document).scrollLeft(d(document).scrollLeft()+e.scrollSpeed))
                }!1!==f&&
        d.ui.ddmanager&&!e.dropBehaviour&&d.ui.ddmanager.prepareOffsets(b,c)
        }
    });
d.ui.plugin.add("draggable","snap",{
    start:function(){
        var c=d(this).data("draggable"),b=c.options;
        c.snapElements=[];
        d(b.snap.constructor!=String?b.snap.items||":data(draggable)":b.snap).each(function(){
            var b=d(this),f=b.offset();
            this!=c.element[0]&&c.snapElements.push({
                item:this,
                width:b.outerWidth(),
                height:b.outerHeight(),
                top:f.top,
                left:f.left
                })
            })
        },
    drag:function(c,b){
        for(var e=d(this).data("draggable"),f=e.options,g=f.snapTolerance,
            h=b.offset.left,j=h+e.helperProportions.width,l=b.offset.top,o=l+e.helperProportions.height,q=e.snapElements.length-1;0<=q;q--){
            var A=e.snapElements[q].left,i=A+e.snapElements[q].width,s=e.snapElements[q].top,x=s+e.snapElements[q].height;
            if(A-g<h&&h<i+g&&s-g<l&&l<x+g||A-g<h&&h<i+g&&s-g<o&&o<x+g||A-g<j&&j<i+g&&s-g<l&&l<x+g||A-g<j&&j<i+g&&s-g<o&&o<x+g){
                if("inner"!=f.snapMode){
                    var H=Math.abs(s-o)<=g,B=Math.abs(x-l)<=g,I=Math.abs(A-j)<=g,L=Math.abs(i-h)<=g;
                    H&&(b.position.top=e._convertPositionTo("relative",

                    {
                        top:s-e.helperProportions.height,
                        left:0
                    }).top-e.margins.top);
                    B&&(b.position.top=e._convertPositionTo("relative",{
                        top:x,
                        left:0
                    }).top-e.margins.top);
                    I&&(b.position.left=e._convertPositionTo("relative",{
                        top:0,
                        left:A-e.helperProportions.width
                        }).left-e.margins.left);
                    L&&(b.position.left=e._convertPositionTo("relative",{
                        top:0,
                        left:i
                    }).left-e.margins.left)
                    }
                    var M=H||B||I||L;
                "outer"!=f.snapMode&&(H=Math.abs(s-l)<=g,B=Math.abs(x-o)<=g,I=Math.abs(A-h)<=g,L=Math.abs(i-j)<=g,H&&(b.position.top=e._convertPositionTo("relative",

                {
                    top:s,
                    left:0
                }).top-e.margins.top),B&&(b.position.top=e._convertPositionTo("relative",{
                    top:x-e.helperProportions.height,
                    left:0
                }).top-e.margins.top),I&&(b.position.left=e._convertPositionTo("relative",{
                    top:0,
                    left:A
                }).left-e.margins.left),L&&(b.position.left=e._convertPositionTo("relative",{
                    top:0,
                    left:i-e.helperProportions.width
                    }).left-e.margins.left));
                !e.snapElements[q].snapping&&(H||B||I||L||M)&&e.options.snap.snap&&e.options.snap.snap.call(e.element,c,d.extend(e._uiHash(),{
                    snapItem:e.snapElements[q].item
                    }));
                e.snapElements[q].snapping=H||B||I||L||M
                }else e.snapElements[q].snapping&&e.options.snap.release&&e.options.snap.release.call(e.element,c,d.extend(e._uiHash(),{
                snapItem:e.snapElements[q].item
                })),e.snapElements[q].snapping=!1
            }
            }
    });
d.ui.plugin.add("draggable","stack",{
    start:function(){
        var c=d(this).data("draggable").options,c=d.makeArray(d(c.stack)).sort(function(b,c){
            return(parseInt(d(b).css("zIndex"),10)||0)-(parseInt(d(c).css("zIndex"),10)||0)
            });
        if(c.length){
            var b=parseInt(c[0].style.zIndex)||0;
            d(c).each(function(c){
                this.style.zIndex=
                b+c
                });
            this[0].style.zIndex=b+c.length
            }
        }
});
d.ui.plugin.add("draggable","zIndex",{
    start:function(c,b){
        var e=d(b.helper),f=d(this).data("draggable").options;
        e.css("zIndex")&&(f._zIndex=e.css("zIndex"));
        e.css("zIndex",f.zIndex)
        },
    stop:function(c,b){
        var e=d(this).data("draggable").options;
        e._zIndex&&d(b.helper).css("zIndex",e._zIndex)
        }
    })
}(jQuery);
C("jquery.ui.droppable")&&function(d){
    d.widget("ui.droppable",{
        widgetEventPrefix:"drop",
        options:{
            accept:"*",
            activeClass:!1,
            addClasses:!0,
            greedy:!1,
            hoverClass:!1,
            scope:"default",
            tolerance:"intersect"
        },
        _create:function(){
            var c=this.options,b=c.accept;
            this.isover=0;
            this.isout=1;
            this.accept=d.isFunction(b)?b:function(c){
                return c.is(b)
                };
                
            this.proportions={
                width:this.element[0].offsetWidth,
                height:this.element[0].offsetHeight
                };
                
            d.ui.ddmanager.droppables[c.scope]=d.ui.ddmanager.droppables[c.scope]||[];
            d.ui.ddmanager.droppables[c.scope].push(this);
            c.addClasses&&this.element.addClass("ui-droppable")
            },
        destroy:function(){
            for(var c=d.ui.ddmanager.droppables[this.options.scope],
                b=0;b<c.length;b++)c[b]==this&&c.splice(b,1);
            this.element.removeClass("ui-droppable ui-droppable-disabled").removeData("droppable").unbind(".droppable");
            return this
            },
        _setOption:function(c,b){
            "accept"==c&&(this.accept=d.isFunction(b)?b:function(c){
                return c.is(b)
                });
            d.Widget.prototype._setOption.apply(this,arguments)
            },
        _activate:function(c){
            var b=d.ui.ddmanager.current;
            this.options.activeClass&&this.element.addClass(this.options.activeClass);
            b&&this._trigger("activate",c,this.ui(b))
            },
        _deactivate:function(c){
            var b=
            d.ui.ddmanager.current;
            this.options.activeClass&&this.element.removeClass(this.options.activeClass);
            b&&this._trigger("deactivate",c,this.ui(b))
            },
        _over:function(c){
            var b=d.ui.ddmanager.current;
            if(b&&(b.currentItem||b.element)[0]!=this.element[0])if(this.accept.call(this.element[0],b.currentItem||b.element))this.options.hoverClass&&this.element.addClass(this.options.hoverClass),this._trigger("over",c,this.ui(b))
                },
        _out:function(c){
            var b=d.ui.ddmanager.current;
            if(b&&(b.currentItem||b.element)[0]!=this.element[0])if(this.accept.call(this.element[0],
                b.currentItem||b.element))this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("out",c,this.ui(b))
                },
        _drop:function(c,b){
            var e=b||d.ui.ddmanager.current;
            if(!e||(e.currentItem||e.element)[0]==this.element[0])return!1;
            var f=!1;
            this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function(){
                var b=d.data(this,"droppable");
                if(b.options.greedy&&!b.options.disabled&&b.options.scope==e.options.scope&&b.accept.call(b.element[0],e.currentItem||e.element)&&
                    d.ui.intersect(e,d.extend(b,{
                        offset:b.element.offset()
                        }),b.options.tolerance))return f=!0,!1
                    });
            if(f)return!1;
            return this.accept.call(this.element[0],e.currentItem||e.element)?(this.options.activeClass&&this.element.removeClass(this.options.activeClass),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("drop",c,this.ui(e)),this.element):!1
            },
        ui:function(c){
            return{
                draggable:c.currentItem||c.element,
                helper:c.helper,
                position:c.position,
                offset:c.positionAbs
                }
            },
    _inBounds:function(c){
        return"function"===
        typeof this.options.inBounds?this.options.inBounds(c):!1
        }
    });
d.extend(d.ui.droppable,{
    version:"1.8.14"
});
d.ui.intersect=function(c,b,e){
    if(!b.offset)return!1;
    var f=(c.positionAbs||c.position.absolute).left,g=f+c.helperProportions.width,h=(c.positionAbs||c.position.absolute).top,j=h+c.helperProportions.height,l=b.offset.left,o=l+b.proportions.width,q=b.offset.top,i=q+b.proportions.height;
    switch(e){
        case "fit":
            return l<=f&&g<=o&&q<=h&&j<=i;
        case "intersect":
            return l<f+c.helperProportions.width/2&&g-c.helperProportions.width/
            2<o&&q<h+c.helperProportions.height/2&&j-c.helperProportions.height/2<i;
        case "pointer":
            return d.ui.isOver((c.positionAbs||c.position.absolute).top+(c.clickOffset||c.offset.click).top,(c.positionAbs||c.position.absolute).left+(c.clickOffset||c.offset.click).left,q,l,b.proportions.height,b.proportions.width);
        case "touch":
            return(h>=q&&h<=i||j>=q&&j<=i||h<q&&j>i)&&(f>=l&&f<=o||g>=l&&g<=o||f<l&&g>o);
        default:
            return!1
            }
        };

d.ui.ddmanager={
    current:null,
    droppables:{
        "default":[]
    },
    prepareOffsets:function(c,b){
        var e=
        d.ui.ddmanager.droppables[c.options.scope]||[],f=b?b.type:null,g=(c.currentItem||c.element).find(":data(droppable)").andSelf(),h=0;
            a:for(;h<e.length;h++)if(!(e[h].options.disabled||c&&!e[h].accept.call(e[h].element[0],c.currentItem||c.element))){
            for(var j=0;j<g.length;j++)if(g[j]==e[h].element[0]){
                e[h].proportions.height=0;
                continue a
            }
            e[h].visible="none"!=e[h].element.css("display");
            e[h].visible&&("mousedown"==f&&e[h]._activate.call(e[h],b),e[h].offset=e[h].element.offset(),e[h].proportions={
                width:e[h].element[0].offsetWidth,
                height:e[h].element[0].offsetHeight
                })
            }
        },
drop:function(c,b){
    var e=!1;
    d.each(d.ui.ddmanager.droppables[c.options.scope]||[],function(){
        if(this.options&&(!this.options.disabled&&this.visible&&this._inBounds(b)&&d.ui.intersect(c,this,this.options.tolerance)&&(e=e||this._drop.call(this,b)),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],c.currentItem||c.element)))this.isout=1,this.isover=0,this._deactivate.call(this,b)
            });
    return e
    },
dragStart:function(c,b){
    c.element.parentsUntil("body").bind("scroll.droppable",
        function(){
            c.options.refreshPositions||d.ui.ddmanager.prepareOffsets(c,b)
            })
    },
drag:function(c,b){
    c.options.refreshPositions&&d.ui.ddmanager.prepareOffsets(c,b);
    d.each(d.ui.ddmanager.droppables[c.options.scope]||[],function(){
        if(!this.options.disabled&&!this.greedyChild&&this.visible){
            var e=this._inBounds(b)&&d.ui.intersect(c,this,this.options.tolerance);
            if(e=!e&&1==this.isover?"isout":e&&0==this.isover?"isover":null){
                var f;
                if(this.options.greedy){
                    var g=this.element.parents(":data(droppable):eq(0)");
                    g.length&&(f=d.data(g[0],"droppable"),f.greedyChild="isover"==e?1:0)
                    }
                    f&&"isover"==e&&(f.isover=0,f.isout=1,f._out.call(f,b));
                this[e]=1;
                this["isout"==e?"isover":"isout"]=0;
                this["isover"==e?"_over":"_out"].call(this,b);
                f&&"isout"==e&&(f.isout=0,f.isover=1,f._over.call(f,b))
                }
            }
    })
},
dragStop:function(c,b){
    c.element.parentsUntil("body").unbind("scroll.droppable");
    c.options.refreshPositions||d.ui.ddmanager.prepareOffsets(c,b)
    }
}
}(jQuery);
C("jquery.ui.sortable")&&function(d){
    d.widget("ui.sortable",d.ui.mouse,

    {
        widgetEventPrefix:"sort",
        options:{
            appendTo:"parent",
            axis:!1,
            connectWith:!1,
            containment:!1,
            cursor:"auto",
            cursorAt:!1,
            dropOnEmpty:!0,
            forcePlaceholderSize:!1,
            forceHelperSize:!1,
            grid:!1,
            handle:!1,
            helper:"original",
            items:"> *",
            opacity:!1,
            placeholder:!1,
            revert:!1,
            scroll:!0,
            scrollSensitivity:20,
            scrollSpeed:20,
            scope:"default",
            tolerance:"intersect",
            zIndex:1E3
        },
        _create:function(){
            var c=this.options;
            this.containerCache={};
            
            this.element.addClass("ui-sortable");
            this.refresh();
            this.floating=this.items.length?"x"===
            c.axis||/left|right/.test(this.items[0].item.css("float"))||/inline|table-cell/.test(this.items[0].item.css("display")):!1;
            this.offset=this.element.offset();
            this._mouseInit()
            },
        destroy:function(){
            this.element.removeClass("ui-sortable ui-sortable-disabled").removeData("sortable").unbind(".sortable");
            this._mouseDestroy();
            for(var c=this.items.length-1;0<=c;c--)this.items[c].item.removeData("sortable-item");
            return this
            },
        _setOption:function(c,b){
            "disabled"===c?(this.options[c]=b,this.widget()[b?"addClass":
                "removeClass"]("ui-sortable-disabled")):d.Widget.prototype._setOption.apply(this,arguments)
            },
        _mouseCapture:function(c,b){
            if(this.reverting||this.options.disabled||"static"==this.options.type)return!1;
            this._refreshItems(c);
            var e=null,f=this;
            d(c.target).parents().each(function(){
                if(d.data(this,"sortable-item")==f)return e=d(this),!1
                    });
            d.data(c.target,"sortable-item")==f&&(e=d(c.target));
            if(!e)return!1;
            if(this.options.handle&&!b){
                var g=!1;
                d(this.options.handle,e).find("*").andSelf().each(function(){
                    this==
                    c.target&&(g=!0)
                    });
                if(!g)return!1
                    }
                    this.currentItem=e;
            this._removeCurrentsFromItems();
            return!0
            },
        _mouseStart:function(c,b,e){
            b=this.options;
            this.currentContainer=this;
            this.refreshPositions();
            this.helper=this._createHelper(c);
            this._cacheHelperProportions();
            this._cacheMargins();
            this.scrollParent=this.helper.scrollParent();
            this.offset=this.currentItem.offset();
            this.offset={
                top:this.offset.top-this.margins.top,
                left:this.offset.left-this.margins.left
                };
                
            this.helper.css("position","absolute");
            this.cssPosition=
            this.helper.css("position");
            d.extend(this.offset,{
                click:{
                    left:c.pageX-this.offset.left,
                    top:c.pageY-this.offset.top
                    },
                parent:this._getParentOffset(),
                relative:this._getRelativeOffset()
                });
            this.originalPosition=this._generatePosition(c);
            this.originalPageX=c.pageX;
            this.originalPageY=c.pageY;
            b.cursorAt&&this._adjustOffsetFromHelper(b.cursorAt);
            this.domPosition={
                prev:this.currentItem.prev()[0],
                parent:this.currentItem.parent()[0]
                };
                
            this.helper[0]!=this.currentItem[0]&&this.currentItem.hide();
            this._createPlaceholder();
            b.containment&&this._setContainment();
            b.cursor&&(d("body").css("cursor")&&(this._storedCursor=d("body").css("cursor")),d("body").css("cursor",b.cursor));
            b.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",b.opacity));
            b.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",b.zIndex));
            this.scrollParent[0]!=document&&"HTML"!=this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset());
            this._trigger("start",c,this._uiHash());
            this._preserveHelperProportions||this._cacheHelperProportions();
            if(!e)for(e=this.containers.length-1;0<=e;e--)this.containers[e]._trigger("activate",c,this._uiHash(this));
            d.ui.ddmanager&&(d.ui.ddmanager.current=this);
            d.ui.ddmanager&&!b.dropBehaviour&&d.ui.ddmanager.prepareOffsets(this,c);
            this.dragging=!0;
            this.helper.addClass("ui-sortable-helper");
            this._mouseDrag(c);
            return!0
            },
        _mouseDrag:function(c){
            this.position=this._generatePosition(c);
            this.positionAbs=this._convertPositionTo("absolute");
            this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs);
            if(this.options.scroll){
                var b=this.options,e=!1;
                this.scrollParent[0]!=document&&"HTML"!=this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-c.pageY<b.scrollSensitivity?this.scrollParent[0].scrollTop=e=this.scrollParent[0].scrollTop+b.scrollSpeed:c.pageY-this.overflowOffset.top<b.scrollSensitivity&&(this.scrollParent[0].scrollTop=e=this.scrollParent[0].scrollTop-b.scrollSpeed),this.overflowOffset.left+
                    this.scrollParent[0].offsetWidth-c.pageX<b.scrollSensitivity?this.scrollParent[0].scrollLeft=e=this.scrollParent[0].scrollLeft+b.scrollSpeed:c.pageX-this.overflowOffset.left<b.scrollSensitivity&&(this.scrollParent[0].scrollLeft=e=this.scrollParent[0].scrollLeft-b.scrollSpeed)):(c.pageY-d(document).scrollTop()<b.scrollSensitivity?e=d(document).scrollTop(d(document).scrollTop()-b.scrollSpeed):d(y).height()-(c.pageY-d(document).scrollTop())<b.scrollSensitivity&&(e=d(document).scrollTop(d(document).scrollTop()+
                    b.scrollSpeed)),c.pageX-d(document).scrollLeft()<b.scrollSensitivity?e=d(document).scrollLeft(d(document).scrollLeft()-b.scrollSpeed):d(y).width()-(c.pageX-d(document).scrollLeft())<b.scrollSensitivity&&(e=d(document).scrollLeft(d(document).scrollLeft()+b.scrollSpeed)));
                !1!==e&&d.ui.ddmanager&&!b.dropBehaviour&&d.ui.ddmanager.prepareOffsets(this,c)
                }
                this.positionAbs=this._convertPositionTo("absolute");
            if(!this.options.axis||"y"!=this.options.axis)this.helper[0].style.left=this.position.left+"px";
            if(!this.options.axis||
                "x"!=this.options.axis)this.helper[0].style.top=this.position.top+"px";
            for(b=this.items.length-1;0<=b;b--){
                var e=this.items[b],f=e.item[0],g=this._intersectsWithPointer(e);
                if(g&&f!=this.currentItem[0]&&this.placeholder[1==g?"next":"prev"]()[0]!=f&&!d.ui.contains(this.placeholder[0],f)&&("semi-dynamic"==this.options.type?!d.ui.contains(this.element[0],f):1)){
                    this.direction=1==g?"down":"up";
                    if("pointer"==this.options.tolerance||this._intersectsWithSides(e))this._rearrange(c,e);else break;
                    this._trigger("change",
                        c,this._uiHash());
                    break
                }
            }
            this._contactContainers(c);
        d.ui.ddmanager&&d.ui.ddmanager.drag(this,c);
        this._trigger("sort",c,this._uiHash());
        this.lastPositionAbs=this.positionAbs;
        return!1
        },
    _mouseStop:function(c,b){
        if(c){
            d.ui.ddmanager&&!this.options.dropBehaviour&&d.ui.ddmanager.drop(this,c);
            if(this.options.revert){
                var e=this,f=e.placeholder.offset();
                e.reverting=!0;
                d(this.helper).animate({
                    left:f.left-this.offset.parent.left-e.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),
                    top:f.top-this.offset.parent.top-e.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)
                    },parseInt(this.options.revert,10)||500,function(){
                    e._clear(c)
                    })
                }else this._clear(c,b);
            return!1
            }
        },
    cancel:function(){
        if(this.dragging){
            this._mouseUp({
                target:null
            });
            "original"==this.options.helper?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();
            for(var c=this.containers.length-1;0<=c;c--)this.containers[c]._trigger("deactivate",null,this._uiHash(this)),
                this.containers[c].containerCache.over&&(this.containers[c]._trigger("out",null,this._uiHash(this)),this.containers[c].containerCache.over=0)
                }
                this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!=this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),d.extend(this,{
            helper:null,
            dragging:!1,
            reverting:!1,
            _noFinalSort:null
        }),this.domPosition.prev?d(this.domPosition.prev).after(this.currentItem):d(this.domPosition.parent).prepend(this.currentItem));
        return this
        },
    serialize:function(c){
        var b=this._getItemsAsjQuery(c&&c.connected),e=[],c=c||{};
        
        d(b).each(function(){
            var b=(d(c.item||this).attr(c.attribute||"id")||"").match(c.expression||/(.+)[-=_](.+)/);
            b&&e.push((c.key||b[1]+"[]")+"="+(c.key&&c.expression?b[1]:b[2]))
            });
        !e.length&&c.key&&e.push(c.key+"=");
        return e.join("&")
        },
    toArray:function(c){
        var b=this._getItemsAsjQuery(c&&c.connected),e=[],c=c||{};
        
        b.each(function(){
            e.push(d(c.item||this).attr(c.attribute||"id")||"")
            });
        return e
        },
    _intersectsWith:function(c){
        var b=
        this.positionAbs.left,e=b+this.helperProportions.width,f=this.positionAbs.top,d=f+this.helperProportions.height,h=c.left,j=h+c.width,l=c.top,o=l+c.height,q=this.offset.click.top,i=this.offset.click.left;
        return"pointer"==this.options.tolerance||this.options.forcePointerForContainers||"pointer"!=this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>c[this.floating?"width":"height"]?f+q>l&&f+q<o&&b+i>h&&b+i<j:h<b+this.helperProportions.width/2&&e-this.helperProportions.width/
        2<j&&l<f+this.helperProportions.height/2&&d-this.helperProportions.height/2<o
        },
    _intersectsWithPointer:function(c){
        var b=d.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,c.top,c.height),c=d.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,c.left,c.width),b=b&&c,c=this._getDragVerticalDirection(),e=this._getDragHorizontalDirection();
        return!b?!1:this.floating?e&&"right"==e||"down"==c?2:1:c&&("down"==c?2:1)
        },
    _intersectsWithSides:function(c){
        var b=d.ui.isOverAxis(this.positionAbs.top+
            this.offset.click.top,c.top+c.height/2,c.height),c=d.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,c.left+c.width/2,c.width),e=this._getDragVerticalDirection(),f=this._getDragHorizontalDirection();
        return this.floating&&f?"right"==f&&c||"left"==f&&!c:e&&("down"==e&&b||"up"==e&&!b)
        },
    _getDragVerticalDirection:function(){
        var c=this.positionAbs.top-this.lastPositionAbs.top;
        return 0!=c&&(0<c?"down":"up")
        },
    _getDragHorizontalDirection:function(){
        var c=this.positionAbs.left-this.lastPositionAbs.left;
        return 0!=c&&(0<c?"right":"left")
        },
    refresh:function(c){
        this._refreshItems(c);
        this.refreshPositions();
        return this
        },
    _connectWith:function(){
        var c=this.options;
        return c.connectWith.constructor==String?[c.connectWith]:c.connectWith
        },
    _getItemsAsjQuery:function(c){
        var b=[],e=[],f=this._connectWith();
        if(f&&c)for(c=f.length-1;0<=c;c--)for(var g=d(f[c]),h=g.length-1;0<=h;h--){
            var j=d.data(g[h],"sortable");
            j&&j!=this&&!j.options.disabled&&e.push([d.isFunction(j.options.items)?j.options.items.call(j.element):
                d(j.options.items,j.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),j])
            }
            e.push([d.isFunction(this.options.items)?this.options.items.call(this.element,null,{
            options:this.options,
            item:this.currentItem
            }):d(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]);
        for(c=e.length-1;0<=c;c--)e[c][0].each(function(){
            b.push(this)
            });
        return d(b)
        },
    _removeCurrentsFromItems:function(){
        for(var c=this.currentItem.find(":data(sortable-item)"),b=0;b<this.items.length;b++)for(var e=
            0;e<c.length;e++)c[e]==this.items[b].item[0]&&this.items.splice(b,1)
            },
    _refreshItems:function(c){
        this.items=[];
        this.containers=[this];
        var b=this.items,e=[[d.isFunction(this.options.items)?this.options.items.call(this.element[0],c,{
            item:this.currentItem
            }):d(this.options.items,this.element),this]],f=this._connectWith();
        if(f)for(var g=f.length-1;0<=g;g--)for(var h=d(f[g]),j=h.length-1;0<=j;j--){
            var l=d.data(h[j],"sortable");
            l&&l!=this&&!l.options.disabled&&(e.push([d.isFunction(l.options.items)?l.options.items.call(l.element[0],
                c,{
                    item:this.currentItem
                    }):d(l.options.items,l.element),l]),this.containers.push(l))
            }
            for(g=e.length-1;0<=g;g--){
            c=e[g][1];
            f=e[g][0];
            j=0;
            for(h=f.length;j<h;j++)l=d(f[j]),l.data("sortable-item",c),b.push({
                item:l,
                instance:c,
                width:0,
                height:0,
                left:0,
                top:0
            })
            }
            },
refreshPositions:function(c){
    this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());
    for(var b=this.items.length-1;0<=b;b--){
        var e=this.items[b];
        if(!(e.instance!=this.currentContainer&&this.currentContainer&&e.item[0]!=this.currentItem[0])){
            var f=
            this.options.toleranceElement?d(this.options.toleranceElement,e.item):e.item;
            c||(e.width=f.outerWidth(),e.height=f.outerHeight());
            f=f.offset();
            e.left=f.left;
            e.top=f.top
            }
        }
    if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(b=this.containers.length-1;0<=b;b--)f=this.containers[b].element.offset(),this.containers[b].containerCache.left=f.left,this.containers[b].containerCache.top=f.top,this.containers[b].containerCache.width=this.containers[b].element.outerWidth(),
    this.containers[b].containerCache.height=this.containers[b].element.outerHeight();
return this
},
_createPlaceholder:function(c){
    var b=c||this,e=b.options;
    if(!e.placeholder||e.placeholder.constructor==String){
        var f=e.placeholder;
        e.placeholder={
            element:function(){
                var c=d(document.createElement(b.currentItem[0].nodeName)).addClass(f||b.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];
                f||(c.style.visibility="hidden");
                return c
                },
            update:function(c,d){
                if(!f||e.forcePlaceholderSize)d.height()||
                    d.height(b.currentItem.innerHeight()-parseInt(b.currentItem.css("paddingTop")||0,10)-parseInt(b.currentItem.css("paddingBottom")||0,10)),d.width()||d.width(b.currentItem.innerWidth()-parseInt(b.currentItem.css("paddingLeft")||0,10)-parseInt(b.currentItem.css("paddingRight")||0,10))
                    }
                }
    }
b.placeholder=d(e.placeholder.element.call(b.element,b.currentItem));
b.currentItem.after(b.placeholder);
e.placeholder.update(b,b.placeholder)
},
_contactContainers:function(c){
    for(var b=null,e=null,f=this.containers.length-
        1;0<=f;f--)if(!d.ui.contains(this.currentItem[0],this.containers[f].element[0]))if(this._intersectsWith(this.containers[f].containerCache)){
        if(!b||!d.ui.contains(this.containers[f].element[0],b.element[0]))b=this.containers[f],e=f
            }else this.containers[f].containerCache.over&&(this.containers[f]._trigger("out",c,this._uiHash(this)),this.containers[f].containerCache.over=0);if(b)if(1===this.containers.length)this.containers[e]._trigger("over",c,this._uiHash(this)),this.containers[e].containerCache.over=
        1;
    else if(this.currentContainer!=this.containers[e]){
        for(var b=1E4,f=null,g=this.positionAbs[this.containers[e].floating?"left":"top"],h=this.items.length-1;0<=h;h--)if(d.ui.contains(this.containers[e].element[0],this.items[h].item[0])){
            var j=this.items[h][this.containers[e].floating?"left":"top"];
            Math.abs(j-g)<b&&(b=Math.abs(j-g),f=this.items[h])
            }
            if(f||this.options.dropOnEmpty)this.currentContainer=this.containers[e],f?this._rearrange(c,f,null,!0):this._rearrange(c,null,this.containers[e].element,
            !0),this._trigger("change",c,this._uiHash()),this.containers[e]._trigger("change",c,this._uiHash(this)),this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[e]._trigger("over",c,this._uiHash(this)),this.containers[e].containerCache.over=1
            }
        },
_createHelper:function(c){
    var b=this.options,c=d.isFunction(b.helper)?d(b.helper.apply(this.element[0],[c,this.currentItem])):"clone"==b.helper?this.currentItem.clone():this.currentItem;
    c.parents("body").length||d("parent"!=b.appendTo?
        b.appendTo:this.currentItem[0].parentNode)[0].appendChild(c[0]);
    c[0]==this.currentItem[0]&&(this._storedCSS={
        width:this.currentItem[0].style.width,
        height:this.currentItem[0].style.height,
        position:this.currentItem.css("position"),
        top:this.currentItem.css("top"),
        left:this.currentItem.css("left")
        });
    (""==c[0].style.width||b.forceHelperSize)&&c.width(this.currentItem.width());
    (""==c[0].style.height||b.forceHelperSize)&&c.height(this.currentItem.height());
    return c
    },
_adjustOffsetFromHelper:function(c){
    "string"==
    typeof c&&(c=c.split(" "));
    d.isArray(c)&&(c={
        left:+c[0],
        top:+c[1]||0
        });
    "left"in c&&(this.offset.click.left=c.left+this.margins.left);
    "right"in c&&(this.offset.click.left=this.helperProportions.width-c.right+this.margins.left);
    "top"in c&&(this.offset.click.top=c.top+this.margins.top);
    "bottom"in c&&(this.offset.click.top=this.helperProportions.height-c.bottom+this.margins.top)
    },
_getParentOffset:function(){
    this.offsetParent=this.helper.offsetParent();
    var c=this.offsetParent.offset();
    "absolute"==this.cssPosition&&
    this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0])&&(c.left+=this.scrollParent.scrollLeft(),c.top+=this.scrollParent.scrollTop());
    if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&"html"==this.offsetParent[0].tagName.toLowerCase()&&d.browser.msie)c={
        top:0,
        left:0
    };
    
    return{
        top:c.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),
        left:c.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)
        }
    },
_getRelativeOffset:function(){
    if("relative"==
        this.cssPosition){
        var c=this.currentItem.position();
        return{
            top:c.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),
            left:c.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()
            }
        }
    return{
    top:0,
    left:0
}
},
_cacheMargins:function(){
    this.margins={
        left:parseInt(this.currentItem.css("marginLeft"),10)||0,
        top:parseInt(this.currentItem.css("marginTop"),10)||0
        }
    },
_cacheHelperProportions:function(){
    this.helperProportions={
        width:this.helper.outerWidth(),
        height:this.helper.outerHeight()
        }
    },
_setContainment:function(){
    var c=this.options;
    "parent"==c.containment&&(c.containment=this.helper[0].parentNode);
    if("document"==c.containment||"window"==c.containment)this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,d("document"==c.containment?document:y).width()-this.helperProportions.width-this.margins.left,(d("document"==c.containment?document:y).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-
        this.margins.top];
    if(!/^(document|window|parent)$/.test(c.containment)){
        var b=d(c.containment)[0],c=d(c.containment).offset(),e="hidden"!=d(b).css("overflow");
        this.containment=[c.left+(parseInt(d(b).css("borderLeftWidth"),10)||0)+(parseInt(d(b).css("paddingLeft"),10)||0)-this.margins.left,c.top+(parseInt(d(b).css("borderTopWidth"),10)||0)+(parseInt(d(b).css("paddingTop"),10)||0)-this.margins.top,c.left+(e?Math.max(b.scrollWidth,b.offsetWidth):b.offsetWidth)-(parseInt(d(b).css("borderLeftWidth"),10)||
            0)-(parseInt(d(b).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,c.top+(e?Math.max(b.scrollHeight,b.offsetHeight):b.offsetHeight)-(parseInt(d(b).css("borderTopWidth"),10)||0)-(parseInt(d(b).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]
        }
    },
_convertPositionTo:function(c,b){
    b||(b=this.position);
    var e="absolute"==c?1:-1,f="absolute"==this.cssPosition&&!(this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:
    this.scrollParent,g=/(html|body)/i.test(f[0].tagName);
    return{
        top:b.top+this.offset.relative.top*e+this.offset.parent.top*e-(d.browser.safari&&"fixed"==this.cssPosition?0:("fixed"==this.cssPosition?-this.scrollParent.scrollTop():g?0:f.scrollTop())*e),
        left:b.left+this.offset.relative.left*e+this.offset.parent.left*e-(d.browser.safari&&"fixed"==this.cssPosition?0:("fixed"==this.cssPosition?-this.scrollParent.scrollLeft():g?0:f.scrollLeft())*e)
        }
    },
_generatePosition:function(c){
    var b=this.options,e="absolute"==
    this.cssPosition&&!(this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,f=/(html|body)/i.test(e[0].tagName);
    "relative"==this.cssPosition&&!(this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0])&&(this.offset.relative=this._getRelativeOffset());
    var g=c.pageX,h=c.pageY;
    this.originalPosition&&(this.containment&&(c.pageX-this.offset.click.left<this.containment[0]&&(g=this.containment[0]+this.offset.click.left),
        c.pageY-this.offset.click.top<this.containment[1]&&(h=this.containment[1]+this.offset.click.top),c.pageX-this.offset.click.left>this.containment[2]&&(g=this.containment[2]+this.offset.click.left),c.pageY-this.offset.click.top>this.containment[3]&&(h=this.containment[3]+this.offset.click.top)),b.grid&&(h=this.originalPageY+Math.round((h-this.originalPageY)/b.grid[1])*b.grid[1],h=this.containment?!(h-this.offset.click.top<this.containment[1]||h-this.offset.click.top>this.containment[3])?h:!(h-this.offset.click.top<
        this.containment[1])?h-b.grid[1]:h+b.grid[1]:h,g=this.originalPageX+Math.round((g-this.originalPageX)/b.grid[0])*b.grid[0],g=this.containment?!(g-this.offset.click.left<this.containment[0]||g-this.offset.click.left>this.containment[2])?g:!(g-this.offset.click.left<this.containment[0])?g-b.grid[0]:g+b.grid[0]:g));
    return{
        top:h-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(d.browser.safari&&"fixed"==this.cssPosition?0:"fixed"==this.cssPosition?-this.scrollParent.scrollTop():
            f?0:e.scrollTop()),
        left:g-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(d.browser.safari&&"fixed"==this.cssPosition?0:"fixed"==this.cssPosition?-this.scrollParent.scrollLeft():f?0:e.scrollLeft())
        }
    },
_rearrange:function(c,b,e,f){
    e?e[0].appendChild(this.placeholder[0]):b.item[0].parentNode.insertBefore(this.placeholder[0],"down"==this.direction?b.item[0]:b.item[0].nextSibling);
    this.counter=this.counter?++this.counter:1;
    var d=this,h=this.counter;
    y.setTimeout(function(){
        h==
        d.counter&&d.refreshPositions(!f)
        },0)
    },
_clear:function(c,b){
    this.reverting=!1;
    var e=[];
    !this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem);
    this._noFinalSort=null;
    if(this.helper[0]==this.currentItem[0]){
        for(var f in this._storedCSS)if("auto"==this._storedCSS[f]||"static"==this._storedCSS[f])this._storedCSS[f]="";this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")
        }else this.currentItem.show();
    this.fromOutside&&!b&&e.push(function(b){
        this._trigger("receive",
            b,this._uiHash(this.fromOutside))
        });
    (this.fromOutside||this.domPosition.prev!=this.currentItem.prev().not(".ui-sortable-helper")[0]||this.domPosition.parent!=this.currentItem.parent()[0])&&!b&&e.push(function(b){
        this._trigger("update",b,this._uiHash())
        });
    if(!d.ui.contains(this.element[0],this.currentItem[0])){
        b||e.push(function(b){
            this._trigger("remove",b,this._uiHash())
            });
        for(f=this.containers.length-1;0<=f;f--)d.ui.contains(this.containers[f].element[0],this.currentItem[0])&&!b&&(e.push(function(b){
            return function(c){
                b._trigger("receive",
                    c,this._uiHash(this))
                }
            }.call(this,this.containers[f])),e.push(function(b){
            return function(c){
                b._trigger("update",c,this._uiHash(this))
                }
            }.call(this,this.containers[f])))
    }
    for(f=this.containers.length-1;0<=f;f--)b||e.push(function(b){
    return function(c){
        b._trigger("deactivate",c,this._uiHash(this))
        }
    }.call(this,this.containers[f])),this.containers[f].containerCache.over&&(e.push(function(b){
    return function(c){
        b._trigger("out",c,this._uiHash(this))
        }
    }.call(this,this.containers[f])),this.containers[f].containerCache.over=
0);
this._storedCursor&&d("body").css("cursor",this._storedCursor);
this._storedOpacity&&this.helper.css("opacity",this._storedOpacity);
this._storedZIndex&&this.helper.css("zIndex","auto"==this._storedZIndex?"":this._storedZIndex);
this.dragging=!1;
if(this.cancelHelperRemoval){
    if(!b){
        this._trigger("beforeStop",c,this._uiHash());
        for(f=0;f<e.length;f++)e[f].call(this,c);
        this._trigger("stop",c,this._uiHash())
        }
        return!1
    }
    b||this._trigger("beforeStop",c,this._uiHash());
this.placeholder[0].parentNode.removeChild(this.placeholder[0]);
this.helper[0]!=this.currentItem[0]&&this.helper.remove();
this.helper=null;
if(!b){
    for(f=0;f<e.length;f++)e[f].call(this,c);
    this._trigger("stop",c,this._uiHash())
    }
    this.fromOutside=!1;
return!0
},
_trigger:function(){
    !1===d.Widget.prototype._trigger.apply(this,arguments)&&this.cancel()
    },
_uiHash:function(c){
    var b=c||this;
    return{
        helper:b.helper,
        placeholder:b.placeholder||d([]),
        position:b.position,
        originalPosition:b.originalPosition,
        offset:b.positionAbs,
        item:b.currentItem,
        sender:c?c.element:null
        }
    }
});
d.extend(d.ui.sortable,

{
    version:"1.8.14"
})
}(jQuery);
C("jquery.ui.datepicker")&&function(d,c){
    function b(){
        this.debug=!1;
        this._curInst=null;
        this._keyEvent=!1;
        this._disabledInputs=[];
        this._inDialog=this._datepickerShowing=!1;
        this._mainDivId="ui-datepicker-div";
        this._inlineClass="ui-datepicker-inline";
        this._appendClass="ui-datepicker-append";
        this._triggerClass="ui-datepicker-trigger";
        this._dialogClass="ui-datepicker-dialog";
        this._disableClass="ui-datepicker-disabled";
        this._unselectableClass="ui-datepicker-unselectable";
        this._currentClass=
        "ui-datepicker-current-day";
        this._dayOverClass="ui-datepicker-days-cell-over";
        this.regional=[];
        this.regional[""]={
            closeText:"Done",
            prevText:"Prev",
            nextText:"Next",
            currentText:"Today",
            monthNames:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),
            monthNamesShort:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),
            dayNames:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),
            dayNamesShort:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(","),
            dayNamesMin:"Su,Mo,Tu,We,Th,Fr,Sa".split(","),
            weekHeader:"Wk",
            dateFormat:"mm/dd/yy",
            firstDay:0,
            isRTL:!1,
            showMonthAfterYear:!1,
            yearSuffix:""
        };
        
        this._defaults={
            showOn:"focus",
            showAnim:"fadeIn",
            showOptions:{},
            defaultDate:null,
            appendText:"",
            buttonText:"...",
            buttonImage:"",
            buttonImageOnly:!1,
            hideIfNoPrevNext:!1,
            navigationAsDateFormat:!1,
            gotoCurrent:!1,
            changeMonth:!1,
            changeYear:!1,
            yearRange:"c-10:c+10",
            showOtherMonths:!1,
            selectOtherMonths:!1,
            showWeek:!1,
            calculateWeek:this.iso8601Week,
            shortYearCutoff:"+10",
            minDate:null,
            maxDate:null,
            duration:"fast",
            beforeShowDay:null,
            beforeShow:null,
            onSelect:null,
            onChangeMonthYear:null,
            onClose:null,
            numberOfMonths:1,
            showCurrentAtPos:0,
            stepMonths:1,
            stepBigMonths:12,
            altField:"",
            altFormat:"",
            constrainInput:!0,
            showButtonPanel:!1,
            autoSize:!1,
            disabled:!1
            };
            
        d.extend(this._defaults,this.regional[""]);
        this.dpDiv=e(d('<div id="'+this._mainDivId+'" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'))
        }
        function e(b){
        return b.bind("mouseout",
            function(b){
                b=d(b.target).closest("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a");
                b.length&&b.removeClass("ui-state-hover ui-datepicker-prev-hover ui-datepicker-next-hover")
                }).bind("mouseover",function(c){
            c=d(c.target).closest("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a");
            if(!d.datepicker._isDisabledDatepicker(h.inline?b.parent()[0]:h.input[0])&&c.length)c.parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),
                c.addClass("ui-state-hover"),c.hasClass("ui-datepicker-prev")&&c.addClass("ui-datepicker-prev-hover"),c.hasClass("ui-datepicker-next")&&c.addClass("ui-datepicker-next-hover")
                })
        }
        function f(b,e){
        d.extend(b,e);
        for(var f in e)if(null==e[f]||e[f]==c)b[f]=e[f];return b
        }
        d.extend(d.ui,{
        datepicker:{
            version:"1.8.16"
        }
    });
var g=(new Date).getTime(),h;
d.extend(b.prototype,{
    markerClassName:"hasDatepicker",
    maxRows:4,
    log:function(){
        this.debug&&console.log.apply("",arguments)
        },
    _widgetDatepicker:function(){
        return this.dpDiv
        },
    setDefaults:function(b){
        f(this._defaults,b||{});
        return this
        },
    _attachDatepicker:function(b,c){
        var e=null,f;
        for(f in this._defaults){
            var g=b.getAttribute("date:"+f);
            if(g){
                e=e||{};
                
                try{
                    e[f]=eval(g)
                    }catch(h){
                    e[f]=g
                    }
                }
        }
            f=b.nodeName.toLowerCase();
    g="div"==f||"span"==f;
    b.id||(this.uuid+=1,b.id="dp"+this.uuid);
    var s=this._newInst(d(b),g);
    s.settings=d.extend({},c||{},e||{});
    "input"==f?this._connectDatepicker(b,s):g&&this._inlineDatepicker(b,s)
    },
_newInst:function(b,c){
    return{
        id:b[0].id.replace(/([^A-Za-z0-9_-])/g,
            "\\\\$1"),
        input:b,
        selectedDay:0,
        selectedMonth:0,
        selectedYear:0,
        drawMonth:0,
        drawYear:0,
        inline:c,
        dpDiv:!c?this.dpDiv:e(d('<div class="'+this._inlineClass+' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'))
        }
    },
_connectDatepicker:function(b,c){
    var e=d(b);
    c.append=d([]);
    c.trigger=d([]);
    e.hasClass(this.markerClassName)||(this._attachments(e,c),e.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp).bind("setData.datepicker",
        function(b,e,f){
            c.settings[e]=f
            }).bind("getData.datepicker",function(b,e){
        return this._get(c,e)
        }),this._autoSize(c),d.data(b,"datepicker",c),c.settings.disabled&&this._disableDatepicker(b))
    },
_attachments:function(b,c){
    var e=this._get(c,"appendText"),f=this._get(c,"isRTL");
    c.append&&c.append.remove();
    e&&(c.append=d('<span class="'+this._appendClass+'">'+e+"</span>"),b[f?"before":"after"](c.append));
    b.unbind("focus",this._showDatepicker);
    c.trigger&&c.trigger.remove();
    e=this._get(c,"showOn");
    ("focus"==
        e||"both"==e)&&b.focus(this._showDatepicker);
    if("button"==e||"both"==e){
        var e=this._get(c,"buttonText"),g=this._get(c,"buttonImage");
        c.trigger=d(this._get(c,"buttonImageOnly")?d("<img/>").addClass(this._triggerClass).attr({
            src:g,
            alt:e,
            title:e
        }):d('<button type="button"></button>').addClass(this._triggerClass).html(""==g?e:d("<img/>").attr({
            src:g,
            alt:e,
            title:e
        })));
        b[f?"before":"after"](c.trigger);
        c.trigger.click(function(){
            d.datepicker._datepickerShowing&&d.datepicker._lastInput==b[0]?d.datepicker._hideDatepicker():
            d.datepicker._showDatepicker(b[0]);
            return!1
            })
        }
    },
_autoSize:function(b){
    if(this._get(b,"autoSize")&&!b.inline){
        var c=new Date(2009,11,20),e=this._get(b,"dateFormat");
        if(e.match(/[DM]/)){
            var f=function(b){
                for(var c=0,e=0,f=0;f<b.length;f++)b[f].length>c&&(c=b[f].length,e=f);
                return e
                };
                
            c.setMonth(f(this._get(b,e.match(/MM/)?"monthNames":"monthNamesShort")));
            c.setDate(f(this._get(b,e.match(/DD/)?"dayNames":"dayNamesShort"))+20-c.getDay())
            }
            b.input.attr("size",this._formatDate(b,c).length)
        }
    },
_inlineDatepicker:function(b,
    c){
    var e=d(b);
    e.hasClass(this.markerClassName)||(e.addClass(this.markerClassName).append(c.dpDiv).bind("setData.datepicker",function(b,e,f){
        c.settings[e]=f
        }).bind("getData.datepicker",function(b,e){
        return this._get(c,e)
        }),d.data(b,"datepicker",c),this._setDate(c,this._getDefaultDate(c),!0),this._updateDatepicker(c),this._updateAlternate(c),c.settings.disabled&&this._disableDatepicker(b),c.dpDiv.css("display","block"))
    },
_dialogDatepicker:function(b,c,e,g,h){
    b=this._dialogInst;
    b||(this.uuid+=1,this._dialogInput=
        d('<input type="text" id="dp'+this.uuid+'" style="position: absolute; top: -100px; width: 0px; z-index: -10;"/>'),this._dialogInput.keydown(this._doKeyDown),d("body").append(this._dialogInput),b=this._dialogInst=this._newInst(this._dialogInput,!1),b.settings={},d.data(this._dialogInput[0],"datepicker",b));
    f(b.settings,g||{});
    c=c&&c.constructor==Date?this._formatDate(b,c):c;
    this._dialogInput.val(c);
    this._pos=h?h.length?h:[h.pageX,h.pageY]:null;
    this._pos||(this._pos=[document.documentElement.clientWidth/
        2-100+(document.documentElement.scrollLeft||document.body.scrollLeft),document.documentElement.clientHeight/2-150+(document.documentElement.scrollTop||document.body.scrollTop)]);
    this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px");
    b.settings.onSelect=e;
    this._inDialog=!0;
    this.dpDiv.addClass(this._dialogClass);
    this._showDatepicker(this._dialogInput[0]);
    d.blockUI&&d.blockUI(this.dpDiv);
    d.data(this._dialogInput[0],"datepicker",b);
    return this
    },
_destroyDatepicker:function(b){
    var c=
    d(b),e=d.data(b,"datepicker");
    if(c.hasClass(this.markerClassName)){
        var f=b.nodeName.toLowerCase();
        d.removeData(b,"datepicker");
        "input"==f?(e.append.remove(),e.trigger.remove(),c.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):("div"==f||"span"==f)&&c.removeClass(this.markerClassName).empty()
        }
    },
_enableDatepicker:function(b){
    var c=d(b),e=d.data(b,"datepicker");
    if(c.hasClass(this.markerClassName)){
        var f=
        b.nodeName.toLowerCase();
        if("input"==f)b.disabled=!1,e.trigger.filter("button").each(function(){
            this.disabled=!1
            }).end().filter("img").css({
            opacity:"1.0",
            cursor:""
        });
        else if("div"==f||"span"==f)c=c.children("."+this._inlineClass),c.children().removeClass("ui-state-disabled"),c.find("select.ui-datepicker-month, select.ui-datepicker-year").removeAttr("disabled");
        this._disabledInputs=d.map(this._disabledInputs,function(c){
            return c==b?null:c
            })
        }
    },
_disableDatepicker:function(b){
    var c=d(b),e=d.data(b,"datepicker");
    if(c.hasClass(this.markerClassName)){
        var f=b.nodeName.toLowerCase();
        if("input"==f)b.disabled=!0,e.trigger.filter("button").each(function(){
            this.disabled=!0
            }).end().filter("img").css({
            opacity:"0.5",
            cursor:"default"
        });
        else if("div"==f||"span"==f)c=c.children("."+this._inlineClass),c.children().addClass("ui-state-disabled"),c.find("select.ui-datepicker-month, select.ui-datepicker-year").attr("disabled","disabled");
        this._disabledInputs=d.map(this._disabledInputs,function(c){
            return c==b?null:c
            });
        this._disabledInputs[this._disabledInputs.length]=
        b
        }
    },
_isDisabledDatepicker:function(b){
    if(!b)return!1;
    for(var c=0;c<this._disabledInputs.length;c++)if(this._disabledInputs[c]==b)return!0;return!1
    },
_getInst:function(b){
    try{
        return d.data(b,"datepicker")
        }catch(c){
        throw"Missing instance data for this datepicker";
    }
},
_optionDatepicker:function(b,e,g){
    var h=this._getInst(b);
    if(2==arguments.length&&"string"==typeof e)return"defaults"==e?d.extend({},d.datepicker._defaults):h?"all"==e?d.extend({},h.settings):this._get(h,e):null;
    var i=e||{};
    
    "string"==typeof e&&
    (i={},i[e]=g);
    if(h){
        this._curInst==h&&this._hideDatepicker();
        var G=this._getDateDatepicker(b,!0),s=this._getMinMaxDate(h,"min"),x=this._getMinMaxDate(h,"max");
        f(h.settings,i);
        null!==s&&i.dateFormat!==c&&i.minDate===c&&(h.settings.minDate=this._formatDate(h,s));
        null!==x&&i.dateFormat!==c&&i.maxDate===c&&(h.settings.maxDate=this._formatDate(h,x));
        this._attachments(d(b),h);
        this._autoSize(h);
        this._setDate(h,G);
        this._updateAlternate(h);
        this._updateDatepicker(h)
        }
    },
_changeDatepicker:function(b,c,e){
    this._optionDatepicker(b,
        c,e)
    },
_refreshDatepicker:function(b){
    (b=this._getInst(b))&&this._updateDatepicker(b)
    },
_setDateDatepicker:function(b,c){
    var e=this._getInst(b);
    e&&(this._setDate(e,c),this._updateDatepicker(e),this._updateAlternate(e))
    },
_getDateDatepicker:function(b,c){
    var e=this._getInst(b);
    e&&!e.inline&&this._setDateFromField(e,c);
    return e?this._getDate(e):null
    },
_doKeyDown:function(b){
    var c=d.datepicker._getInst(b.target),e=!0,f=c.dpDiv.is(".ui-datepicker-rtl");
    c._keyEvent=!0;
    if(d.datepicker._datepickerShowing)switch(b.keyCode){
        case 9:
            d.datepicker._hideDatepicker();
            e=!1;
            break;
        case 13:
            return e=d("td."+d.datepicker._dayOverClass+":not(."+d.datepicker._currentClass+")",c.dpDiv),e[0]&&d.datepicker._selectDay(b.target,c.selectedMonth,c.selectedYear,e[0]),(b=d.datepicker._get(c,"onSelect"))?(e=d.datepicker._formatDate(c),b.apply(c.input?c.input[0]:null,[e,c])):d.datepicker._hideDatepicker(),!1;
        case 27:
            d.datepicker._hideDatepicker();
            break;
        case 33:
            d.datepicker._adjustDate(b.target,b.ctrlKey?-d.datepicker._get(c,"stepBigMonths"):-d.datepicker._get(c,"stepMonths"),"M");
            break;
        case 34:
            d.datepicker._adjustDate(b.target,b.ctrlKey?+d.datepicker._get(c,"stepBigMonths"):+d.datepicker._get(c,"stepMonths"),"M");
            break;
        case 35:
            (b.ctrlKey||b.metaKey)&&d.datepicker._clearDate(b.target);
            e=b.ctrlKey||b.metaKey;
            break;
        case 36:
            (b.ctrlKey||b.metaKey)&&d.datepicker._gotoToday(b.target);
            e=b.ctrlKey||b.metaKey;
            break;
        case 37:
            if(b.ctrlKey||b.metaKey)d.datepicker._adjustDate(b.target,f?1:-1,"D");
            e=b.ctrlKey||b.metaKey;
            b.originalEvent.altKey&&d.datepicker._adjustDate(b.target,b.ctrlKey?
            -d.datepicker._get(c,"stepBigMonths"):-d.datepicker._get(c,"stepMonths"),"M");
        break;
        case 38:
            (b.ctrlKey||b.metaKey)&&d.datepicker._adjustDate(b.target,-7,"D");
            e=b.ctrlKey||b.metaKey;
            break;
        case 39:
            if(b.ctrlKey||b.metaKey)d.datepicker._adjustDate(b.target,f?-1:1,"D");
            e=b.ctrlKey||b.metaKey;
            b.originalEvent.altKey&&d.datepicker._adjustDate(b.target,b.ctrlKey?+d.datepicker._get(c,"stepBigMonths"):+d.datepicker._get(c,"stepMonths"),"M");
            break;
        case 40:
            (b.ctrlKey||b.metaKey)&&d.datepicker._adjustDate(b.target,
            7,"D");
        e=b.ctrlKey||b.metaKey;
        break;
        default:
            e=!1
            }else 36==b.keyCode&&b.ctrlKey?d.datepicker._showDatepicker(this):e=!1;
    e&&(b.preventDefault(),b.stopPropagation())
    },
_doKeyPress:function(b){
    var e=d.datepicker._getInst(b.target);
    if(d.datepicker._get(e,"constrainInput")){
        var e=d.datepicker._possibleChars(d.datepicker._get(e,"dateFormat")),f=String.fromCharCode(b.charCode==c?b.keyCode:b.charCode);
        return b.ctrlKey||b.metaKey||" ">f||!e||-1<e.indexOf(f)
        }
    },
_doKeyUp:function(b){
    b=d.datepicker._getInst(b.target);
    if(b.input.val()!=b.lastVal)try{
        if(d.datepicker.parseDate(d.datepicker._get(b,"dateFormat"),b.input?b.input.val():null,d.datepicker._getFormatConfig(b)))d.datepicker._setDateFromField(b),d.datepicker._updateAlternate(b),d.datepicker._updateDatepicker(b)
            }catch(c){
        d.datepicker.log(c)
        }
        return!0
    },
_showDatepicker:function(b){
    b=b.target||b;
    "input"!=b.nodeName.toLowerCase()&&(b=d("input",b.parentNode)[0]);
    if(!(d.datepicker._isDisabledDatepicker(b)||d.datepicker._lastInput==b)){
        var c=d.datepicker._getInst(b);
        d.datepicker._curInst&&d.datepicker._curInst!=c&&(d.datepicker._datepickerShowing&&d.datepicker._triggerOnClose(d.datepicker._curInst),d.datepicker._curInst.dpDiv.stop(!0,!0));
        var e=d.datepicker._get(c,"beforeShow"),e=e?e.apply(b,[b,c]):{};
        
        if(!1!==e){
            f(c.settings,e);
            c.lastVal=null;
            d.datepicker._lastInput=b;
            d.datepicker._setDateFromField(c);
            d.datepicker._inDialog&&(b.value="");
            d.datepicker._pos||(d.datepicker._pos=d.datepicker._findPos(b),d.datepicker._pos[1]+=b.offsetHeight);
            var g=!1;
            d(b).parents().each(function(){
                g|=
                "fixed"==d(this).css("position");
                return!g
                });
            g&&d.browser.opera&&(d.datepicker._pos[0]-=document.documentElement.scrollLeft,d.datepicker._pos[1]-=document.documentElement.scrollTop);
            e={
                left:d.datepicker._pos[0],
                top:d.datepicker._pos[1]
                };
                
            d.datepicker._pos=null;
            c.dpDiv.empty();
            c.dpDiv.css({
                position:"absolute",
                display:"block",
                top:"-1000px"
            });
            d.datepicker._updateDatepicker(c);
            e=d.datepicker._checkOffset(c,e,g);
            c.dpDiv.css({
                position:d.datepicker._inDialog&&d.blockUI?"static":g?"fixed":"absolute",
                display:"none",
                left:e.left+"px",
                top:e.top+"px"
                });
            if(!c.inline){
                var e=d.datepicker._get(c,"showAnim"),h=d.datepicker._get(c,"duration"),i=function(){
                    var b=c.dpDiv.find("iframe.ui-datepicker-cover");
                    if(b.length){
                        var e=d.datepicker._getBorders(c.dpDiv);
                        b.css({
                            left:-e[0],
                            top:-e[1],
                            width:c.dpDiv.outerWidth(),
                            height:c.dpDiv.outerHeight()
                            })
                        }
                    };
                
            c.dpDiv.zIndex(d(b).zIndex()+1);
            d.datepicker._datepickerShowing=!0;
            if(d.effects&&d.effects[e])c.dpDiv.show(e,d.datepicker._get(c,"showOptions"),h,i);else c.dpDiv[e||"show"](e?h:null,
                i);
            (!e||!h)&&i();
            c.input.is(":visible")&&!c.input.is(":disabled")&&c.input.focus();
            d.datepicker._curInst=c
            }
        }
}
},
_updateDatepicker:function(b){
    this.maxRows=4;
    var c=d.datepicker._getBorders(b.dpDiv);
    h=b;
    b.dpDiv.empty().append(this._generateHTML(b));
    var e=b.dpDiv.find("iframe.ui-datepicker-cover");
    e.length&&e.css({
        left:-c[0],
        top:-c[1],
        width:b.dpDiv.outerWidth(),
        height:b.dpDiv.outerHeight()
        });
    b.dpDiv.find("."+this._dayOverClass+" a").mouseover();
    c=this._getNumberOfMonths(b);
    e=c[1];
    b.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("");
    1<e&&b.dpDiv.addClass("ui-datepicker-multi-"+e).css("width",17*e+"em");
    b.dpDiv[(1!=c[0]||1!=c[1]?"add":"remove")+"Class"]("ui-datepicker-multi");
    b.dpDiv[(this._get(b,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl");
    b==d.datepicker._curInst&&d.datepicker._datepickerShowing&&b.input&&b.input.is(":visible")&&!b.input.is(":disabled")&&b.input[0]!=document.activeElement&&b.input.focus();
    if(b.yearshtml){
        var f=b.yearshtml;
        setTimeout(function(){
            f===b.yearshtml&&b.yearshtml&&b.dpDiv.find("select.ui-datepicker-year:first").replaceWith(b.yearshtml);
            f=b.yearshtml=null
            },0)
        }
    },
_getBorders:function(b){
    var c=function(b){
        return{
            thin:1,
            medium:2,
            thick:3
        }
        [b]||b
        };
        
    return[parseFloat(c(b.css("border-left-width"))),parseFloat(c(b.css("border-top-width")))]
    },
_checkOffset:function(b,c,e){
    var f=b.dpDiv.outerWidth(),g=b.dpDiv.outerHeight(),h=b.input?b.input.outerWidth():0,s=b.input?b.input.outerHeight():0,x=document.documentElement.clientWidth+d(document).scrollLeft(),i=document.documentElement.clientHeight+d(document).scrollTop();
    c.left-=this._get(b,"isRTL")?
    f-h:0;
    c.left-=e&&c.left==b.input.offset().left?d(document).scrollLeft():0;
    c.top-=e&&c.top==b.input.offset().top+s?d(document).scrollTop():0;
    c.left-=Math.min(c.left,c.left+f>x&&x>f?Math.abs(c.left+f-x):0);
    c.top-=Math.min(c.top,c.top+g>i&&i>g?Math.abs(g+s):0);
    return c
    },
_findPos:function(b){
    for(var c=this._get(this._getInst(b),"isRTL");b&&("hidden"==b.type||1!=b.nodeType||d.expr.filters.hidden(b));)b=b[c?"previousSibling":"nextSibling"];
    b=d(b).offset();
    return[b.left,b.top]
    },
_triggerOnClose:function(b){
    var c=
    this._get(b,"onClose");
    c&&c.apply(b.input?b.input[0]:null,[b.input?b.input.val():"",b])
    },
_hideDatepicker:function(b){
    var c=this._curInst;
    if(c&&!(b&&c!=d.data(b,"datepicker"))&&this._datepickerShowing){
        var b=this._get(c,"showAnim"),e=this._get(c,"duration"),f=function(){
            d.datepicker._tidyDialog(c);
            this._curInst=null
            };
            
        if(d.effects&&d.effects[b])c.dpDiv.hide(b,d.datepicker._get(c,"showOptions"),e,f);else c.dpDiv["slideDown"==b?"slideUp":"fadeIn"==b?"fadeOut":"hide"](b?e:null,f);
        b||f();
        d.datepicker._triggerOnClose(c);
        this._datepickerShowing=!1;
        this._lastInput=null;
        this._inDialog&&(this._dialogInput.css({
            position:"absolute",
            left:"0",
            top:"-100px"
        }),d.blockUI&&(d.unblockUI(),d("body").append(this.dpDiv)));
        this._inDialog=!1
        }
    },
_tidyDialog:function(b){
    b.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")
    },
_checkExternalClick:function(b){
    d.datepicker._curInst&&(b=d(b.target),b[0].id!=d.datepicker._mainDivId&&0==b.parents("#"+d.datepicker._mainDivId).length&&!b.hasClass(d.datepicker.markerClassName)&&
        !b.hasClass(d.datepicker._triggerClass)&&d.datepicker._datepickerShowing&&(!d.datepicker._inDialog||!d.blockUI)&&d.datepicker._hideDatepicker())
    },
_adjustDate:function(b,c,e){
    var b=d(b),f=this._getInst(b[0]);
    this._isDisabledDatepicker(b[0])||(this._adjustInstDate(f,c+("M"==e?this._get(f,"showCurrentAtPos"):0),e),this._updateDatepicker(f))
    },
_gotoToday:function(b){
    var b=d(b),c=this._getInst(b[0]);
    if(this._get(c,"gotoCurrent")&&c.currentDay)c.selectedDay=c.currentDay,c.drawMonth=c.selectedMonth=c.currentMonth,
        c.drawYear=c.selectedYear=c.currentYear;
    else{
        var e=new Date;
        c.selectedDay=e.getDate();
        c.drawMonth=c.selectedMonth=e.getMonth();
        c.drawYear=c.selectedYear=e.getFullYear()
        }
        this._notifyChange(c);
    this._adjustDate(b)
    },
_selectMonthYear:function(b,c,e){
    var b=d(b),f=this._getInst(b[0]);
    f["selected"+("M"==e?"Month":"Year")]=f["draw"+("M"==e?"Month":"Year")]=parseInt(c.options[c.selectedIndex].value,10);
    this._notifyChange(f);
    this._adjustDate(b)
    },
_selectDay:function(b,c,e,f){
    var g=d(b);
    !d(f).hasClass(this._unselectableClass)&&
    !this._isDisabledDatepicker(g[0])&&(g=this._getInst(g[0]),g.selectedDay=g.currentDay=d("a",f).html(),g.selectedMonth=g.currentMonth=c,g.selectedYear=g.currentYear=e,this._selectDate(b,this._formatDate(g,g.currentDay,g.currentMonth,g.currentYear)))
    },
_clearDate:function(b){
    b=d(b);
    this._getInst(b[0]);
    this._selectDate(b,"")
    },
_selectDate:function(b,c){
    var e=this._getInst(d(b)[0]),c=null!=c?c:this._formatDate(e);
    e.input&&e.input.val(c);
    this._updateAlternate(e);
    var f=this._get(e,"onSelect");
    f?f.apply(e.input?
        e.input[0]:null,[c,e]):e.input&&e.input.trigger("change");
    e.inline?this._updateDatepicker(e):(this._hideDatepicker(),this._lastInput=e.input[0],"object"!=typeof e.input[0]&&e.input.focus(),this._lastInput=null)
    },
_updateAlternate:function(b){
    var c=this._get(b,"altField");
    if(c){
        var e=this._get(b,"altFormat")||this._get(b,"dateFormat"),f=this._getDate(b),g=this.formatDate(e,f,this._getFormatConfig(b));
        d(c).each(function(){
            d(this).val(g)
            })
        }
    },
noWeekends:function(b){
    b=b.getDay();
    return[0<b&&6>b,""]
    },
iso8601Week:function(b){
    b=
    new Date(b.getTime());
    b.setDate(b.getDate()+4-(b.getDay()||7));
    var c=b.getTime();
    b.setMonth(0);
    b.setDate(1);
    return Math.floor(Math.round((c-b)/864E5)/7)+1
    },
parseDate:function(b,c,e){
    if(null==b||null==c)throw"Invalid arguments";
    c="object"==typeof c?c.toString():c+"";
    if(""==c)return null;
    for(var f=(e?e.shortYearCutoff:null)||this._defaults.shortYearCutoff,f="string"!=typeof f?f:(new Date).getFullYear()%100+parseInt(f,10),g=(e?e.dayNamesShort:null)||this._defaults.dayNamesShort,h=(e?e.dayNames:null)||
        this._defaults.dayNames,s=(e?e.monthNamesShort:null)||this._defaults.monthNamesShort,x=(e?e.monthNames:null)||this._defaults.monthNames,i=e=-1,B=-1,I=-1,L=!1,M=function(c){
            (c=t+1<b.length&&b.charAt(t+1)==c)&&t++;
            return c
            },P=function(b){
            var e=M(b),b=c.substring(n).match(RegExp("^\\d{1,"+("@"==b?14:"!"==b?20:"y"==b&&e?4:"o"==b?3:2)+"}"));
            if(!b)throw"Missing number at position "+n;
            n+=b[0].length;
            return parseInt(b[0],10)
            },w=function(b,e,f){
            var b=d.map(M(b)?f:e,function(b,c){
                return[[c,b]]
                }).sort(function(b,
                c){
                return-(b[1].length-c[1].length)
                }),j=-1;
            d.each(b,function(b,e){
                var f=e[1];
                if(c.substr(n,f.length).toLowerCase()==f.toLowerCase())return j=e[0],n+=f.length,!1
                    });
            if(-1!=j)return j+1;
            throw"Unknown name at position "+n;
        },m=function(){
            if(c.charAt(n)!=b.charAt(t))throw"Unexpected literal at position "+n;
            n++
        },n=0,t=0;t<b.length;t++)if(L)"'"==b.charAt(t)&&!M("'")?L=!1:m();else switch(b.charAt(t)){
        case "d":
            B=P("d");
            break;
        case "D":
            w("D",g,h);
            break;
        case "o":
            I=P("o");
            break;
        case "m":
            i=P("m");
            break;
        case "M":
            i=
            w("M",s,x);
            break;
        case "y":
            e=P("y");
            break;
        case "@":
            var v=new Date(P("@")),e=v.getFullYear(),i=v.getMonth()+1,B=v.getDate();
            break;
        case "!":
            v=new Date((P("!")-this._ticksTo1970)/1E4);
            e=v.getFullYear();
            i=v.getMonth()+1;
            B=v.getDate();
            break;
        case "'":
            M("'")?m():L=!0;
            break;
        default:
            m()
            }
            if(n<c.length)throw"Extra/unparsed characters found in date: "+c.substring(n);
    -1==e?e=(new Date).getFullYear():100>e&&(e+=(new Date).getFullYear()-(new Date).getFullYear()%100+(e<=f?0:-100));
    if(-1<I){
        i=1;
        B=I;
        do{
            f=this._getDaysInMonth(e,
                i-1);
            if(B<=f)break;
            i++;
            B-=f
            }while(1)
    }
    v=this._daylightSavingAdjust(new Date(e,i-1,B));
    if(v.getFullYear()!=e||v.getMonth()+1!=i||v.getDate()!=B)throw"Invalid date";
    return v
    },
ATOM:"yy-mm-dd",
COOKIE:"D, dd M yy",
ISO_8601:"yy-mm-dd",
RFC_822:"D, d M y",
RFC_850:"DD, dd-M-y",
RFC_1036:"D, d M y",
RFC_1123:"D, d M yy",
RFC_2822:"D, d M yy",
RSS:"D, d M y",
TICKS:"!",
TIMESTAMP:"@",
W3C:"yy-mm-dd",
_ticksTo1970:864E9*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925)),
formatDate:function(b,c,e){
    if(!c)return"";
    var f=(e?e.dayNamesShort:null)||this._defaults.dayNamesShort,d=(e?e.dayNames:null)||this._defaults.dayNames,g=(e?e.monthNamesShort:null)||this._defaults.monthNamesShort,e=(e?e.monthNames:null)||this._defaults.monthNames,h=function(c){
        (c=L+1<b.length&&b.charAt(L+1)==c)&&L++;
        return c
        },x=function(b,c,e){
        c=""+c;
        if(h(b))for(;c.length<e;)c="0"+c;
        return c
        },i=function(b,c,e,f){
        return h(b)?f[c]:e[c]
        },B="",I=!1;
    if(c)for(var L=0;L<b.length;L++)if(I)"'"==b.charAt(L)&&!h("'")?I=!1:B+=b.charAt(L);else switch(b.charAt(L)){
        case "d":
            B+=
            x("d",c.getDate(),2);
            break;
        case "D":
            B+=i("D",c.getDay(),f,d);
            break;
        case "o":
            B+=x("o",Math.round(((new Date(c.getFullYear(),c.getMonth(),c.getDate())).getTime()-(new Date(c.getFullYear(),0,0)).getTime())/864E5),3);
            break;
        case "m":
            B+=x("m",c.getMonth()+1,2);
            break;
        case "M":
            B+=i("M",c.getMonth(),g,e);
            break;
        case "y":
            B+=h("y")?c.getFullYear():(10>c.getYear()%100?"0":"")+c.getYear()%100;
            break;
        case "@":
            B+=c.getTime();
            break;
        case "!":
            B+=1E4*c.getTime()+this._ticksTo1970;
            break;
        case "'":
            h("'")?B+="'":I=!0;
            break;
        default:
            B+=b.charAt(L)
            }
            return B
    },
_possibleChars:function(b){
    for(var c="",e=!1,f=function(c){
        (c=d+1<b.length&&b.charAt(d+1)==c)&&d++;
        return c
        },d=0;d<b.length;d++)if(e)"'"==b.charAt(d)&&!f("'")?e=!1:c+=b.charAt(d);else switch(b.charAt(d)){
        case "d":case "m":case "y":case "@":
            c+="0123456789";
            break;
        case "D":case "M":
            return null;
        case "'":
            f("'")?c+="'":e=!0;
            break;
        default:
            c+=b.charAt(d)
            }
            return c
    },
_get:function(b,e){
    return b.settings[e]!==c?b.settings[e]:this._defaults[e]
    },
_setDateFromField:function(b,c){
    if(b.input.val()!=
        b.lastVal){
        var e=this._get(b,"dateFormat"),f=b.lastVal=b.input?b.input.val():null,d,g;
        d=g=this._getDefaultDate(b);
        var h=this._getFormatConfig(b);
        try{
            d=this.parseDate(e,f,h)||g
            }catch(x){
            this.log(x),f=c?"":f
            }
            b.selectedDay=d.getDate();
        b.drawMonth=b.selectedMonth=d.getMonth();
        b.drawYear=b.selectedYear=d.getFullYear();
        b.currentDay=f?d.getDate():0;
        b.currentMonth=f?d.getMonth():0;
        b.currentYear=f?d.getFullYear():0;
        this._adjustInstDate(b)
        }
    },
_getDefaultDate:function(b){
    return this._restrictMinMax(b,this._determineDate(b,
        this._get(b,"defaultDate"),new Date))
    },
_determineDate:function(b,c,e){
    var f=function(b){
        var c=new Date;
        c.setDate(c.getDate()+b);
        return c
        };
        
    if(c=(c=null==c||""===c?e:"string"==typeof c?function(c){
        try{
            return d.datepicker.parseDate(d.datepicker._get(b,"dateFormat"),c,d.datepicker._getFormatConfig(b))
            }catch(e){}
        for(var f=(c.toLowerCase().match(/^c/)?d.datepicker._getDate(b):null)||new Date,g=f.getFullYear(),h=f.getMonth(),f=f.getDate(),l=/([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,o=l.exec(c);o;){
            switch(o[2]||
                "d"){
            case "d":case "D":
                f+=parseInt(o[1],10);
                break;
                case "w":case "W":
                f+=7*parseInt(o[1],10);
                break;
                case "m":case "M":
                h+=parseInt(o[1],10);
                f=Math.min(f,d.datepicker._getDaysInMonth(g,h));
                break;
                case "y":case "Y":
                g+=parseInt(o[1],10),f=Math.min(f,d.datepicker._getDaysInMonth(g,h))
                }
                o=l.exec(c)
            }
            return new Date(g,h,f)
        }(c):"number"==typeof c?isNaN(c)?e:f(c):new Date(c.getTime()))&&"Invalid Date"==c.toString()?e:c)c.setHours(0),c.setMinutes(0),c.setSeconds(0),c.setMilliseconds(0);
    return this._daylightSavingAdjust(c)
    },
_daylightSavingAdjust:function(b){
    if(!b)return null;
    b.setHours(12<b.getHours()?b.getHours()+2:0);
    return b
    },
_setDate:function(b,c,e){
    var f=!c,d=b.selectedMonth,g=b.selectedYear,c=this._restrictMinMax(b,this._determineDate(b,c,new Date));
    b.selectedDay=b.currentDay=c.getDate();
    b.drawMonth=b.selectedMonth=b.currentMonth=c.getMonth();
    b.drawYear=b.selectedYear=b.currentYear=c.getFullYear();
    (d!=b.selectedMonth||g!=b.selectedYear)&&!e&&this._notifyChange(b);
    this._adjustInstDate(b);
    b.input&&b.input.val(f?
        "":this._formatDate(b))
    },
_getDate:function(b){
    return!b.currentYear||b.input&&""==b.input.val()?null:this._daylightSavingAdjust(new Date(b.currentYear,b.currentMonth,b.currentDay))
    },
_generateHTML:function(b){
    var c=new Date,c=this._daylightSavingAdjust(new Date(c.getFullYear(),c.getMonth(),c.getDate())),e=this._get(b,"isRTL"),f=this._get(b,"showButtonPanel"),h=this._get(b,"hideIfNoPrevNext"),i=this._get(b,"navigationAsDateFormat"),s=this._getNumberOfMonths(b),x=this._get(b,"showCurrentAtPos"),H=this._get(b,
        "stepMonths"),B=1!=s[0]||1!=s[1],I=this._daylightSavingAdjust(!b.currentDay?new Date(9999,9,9):new Date(b.currentYear,b.currentMonth,b.currentDay)),L=this._getMinMaxDate(b,"min"),M=this._getMinMaxDate(b,"max"),x=b.drawMonth-x,P=b.drawYear;
    0>x&&(x+=12,P--);
    if(M)for(var w=this._daylightSavingAdjust(new Date(M.getFullYear(),M.getMonth()-s[0]*s[1]+1,M.getDate())),w=L&&w<L?L:w;this._daylightSavingAdjust(new Date(P,x,1))>w;)x--,0>x&&(x=11,P--);
    b.drawMonth=x;
    b.drawYear=P;
    var w=this._get(b,"prevText"),w=
    !i?w:this.formatDate(w,this._daylightSavingAdjust(new Date(P,x-H,1)),this._getFormatConfig(b)),w=this._canAdjustMonth(b,-1,P,x)?'<a class="ui-datepicker-prev ui-corner-all" onclick="DP_jQuery_'+g+".datepicker._adjustDate('#"+b.id+"', -"+H+", 'M');\" title=\""+w+'"><span class="ui-icon ui-icon-circle-triangle-'+(e?"e":"w")+'">'+w+"</span></a>":h?"":'<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+w+'"><span class="ui-icon ui-icon-circle-triangle-'+(e?"e":"w")+'">'+w+"</span></a>",
    m=this._get(b,"nextText"),m=!i?m:this.formatDate(m,this._daylightSavingAdjust(new Date(P,x+H,1)),this._getFormatConfig(b)),h=this._canAdjustMonth(b,1,P,x)?'<a class="ui-datepicker-next ui-corner-all" onclick="DP_jQuery_'+g+".datepicker._adjustDate('#"+b.id+"', +"+H+", 'M');\" title=\""+m+'"><span class="ui-icon ui-icon-circle-triangle-'+(e?"w":"e")+'">'+m+"</span></a>":h?"":'<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+m+'"><span class="ui-icon ui-icon-circle-triangle-'+
    (e?"w":"e")+'">'+m+"</span></a>",H=this._get(b,"currentText"),m=this._get(b,"gotoCurrent")&&b.currentDay?I:c,H=!i?H:this.formatDate(H,m,this._getFormatConfig(b)),i=!b.inline?'<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" onclick="DP_jQuery_'+g+'.datepicker._hideDatepicker();">'+this._get(b,"closeText")+"</button>":"",f=f?'<div class="ui-datepicker-buttonpane ui-widget-content">'+(e?i:"")+(this._isInRange(b,m)?'<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" onclick="DP_jQuery_'+
        g+".datepicker._gotoToday('#"+b.id+"');\">"+H+"</button>":"")+(e?"":i)+"</div>":"",i=parseInt(this._get(b,"firstDay"),10),i=isNaN(i)?0:i,H=this._get(b,"showWeek"),m=this._get(b,"dayNames");
    this._get(b,"dayNamesShort");
    var n=this._get(b,"dayNamesMin"),t=this._get(b,"monthNames"),v=this._get(b,"monthNamesShort"),u=this._get(b,"beforeShowDay"),z=this._get(b,"showOtherMonths"),y=this._get(b,"selectOtherMonths");
    this._get(b,"calculateWeek");
    for(var k=this._getDefaultDate(b),C="",D=0;D<s[0];D++){
        var F=
        "";
        this.maxRows=4;
        for(var E=0;E<s[1];E++){
            var J=this._daylightSavingAdjust(new Date(P,x,b.selectedDay)),K=" ui-corner-all",Q="";
            if(B){
                Q+='<div class="ui-datepicker-group';
                if(1<s[1])switch(E){
                    case 0:
                        Q+=" ui-datepicker-group-first";
                        K=" ui-corner-"+(e?"right":"left");
                        break;
                    case s[1]-1:
                        Q+=" ui-datepicker-group-last";
                        K=" ui-corner-"+(e?"left":"right");
                        break;
                    default:
                        Q+=" ui-datepicker-group-middle",K=""
                        }
                        Q+='">'
                }
                for(var Q=Q+('<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix'+K+'">'+(/all|left/.test(K)&&
                0==D?e?h:w:"")+(/all|right/.test(K)&&0==D?e?w:h:"")+this._generateMonthYearHeader(b,x,P,L,M,0<D||0<E,t,v)+'</div><table class="ui-datepicker-calendar"><thead><tr>'),ca=H?'<th class="ui-datepicker-week-col">'+this._get(b,"weekHeader")+"</th>":"",K=0;7>K;K++)var V=(K+i)%7,ca=ca+("<th"+(5<=(K+i+6)%7?' class="ui-datepicker-week-end"':"")+'><span title="'+m[V]+'">'+n[V]+"</span></th>");
            Q+=ca+"</tr></thead><tbody>";
            ca=this._getDaysInMonth(P,x);
            P==b.selectedYear&&x==b.selectedMonth&&(b.selectedDay=Math.min(b.selectedDay,
                ca));
            K=(this._getFirstDayOfMonth(P,x)-i+7)%7;
            ca=Math.ceil((K+ca)/7);
            this.maxRows=ca=B?this.maxRows>ca?this.maxRows:ca:ca;
            for(var V=this._daylightSavingAdjust(new Date(P,x,1-K)),sa=0;sa<ca;sa++){
                for(var Q=Q+"<tr>",ub=!H?"":'<td class="ui-datepicker-week-col">'+this._get(b,"calculateWeek")(V)+"</td>",K=0;7>K;K++){
                    var O=u?u.apply(b.input?b.input[0]:null,[V]):[!0,""],N=V.getMonth()!=x,R=N&&!y||!O[0]||L&&V<L||M&&V>M,ub=ub+('<td class="'+(5<=(K+i+6)%7?" ui-datepicker-week-end":"")+(N?" ui-datepicker-other-month":
                        "")+(V.getTime()==J.getTime()&&x==b.selectedMonth&&b._keyEvent||k.getTime()==V.getTime()&&k.getTime()==J.getTime()?" "+this._dayOverClass:"")+(R?" "+this._unselectableClass+" ui-state-disabled":"")+(N&&!z?"":" "+O[1]+(V.getTime()==I.getTime()?" "+this._currentClass:"")+(V.getTime()==c.getTime()?" ui-datepicker-today":""))+'"'+((!N||z)&&O[2]?' title="'+O[2]+'"':"")+(R?"":' onclick="DP_jQuery_'+g+".datepicker._selectDay('#"+b.id+"',"+V.getMonth()+","+V.getFullYear()+', this);return false;"')+">"+(N&&
                        !z?"&#xa0;":R?'<span class="ui-state-default">'+V.getDate()+"</span>":'<a class="ui-state-default'+(V.getTime()==c.getTime()?" ui-state-highlight":"")+(V.getTime()==I.getTime()?" ui-state-active":"")+(N?" ui-priority-secondary":"")+'" href="#">'+V.getDate()+"</a>")+"</td>");
                    V.setDate(V.getDate()+1);
                    V=this._daylightSavingAdjust(V)
                    }
                    Q+=ub+"</tr>"
                }
                x++;
            11<x&&(x=0,P++);
            Q+="</tbody></table>"+(B?"</div>"+(0<s[0]&&E==s[1]-1?'<div class="ui-datepicker-row-break"></div>':""):"");
            F+=Q
            }
            C+=F
        }
        C+=f+(d.browser.msie&&
        7>parseInt(d.browser.version,10)&&!b.inline?'<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>':"");
    b._keyEvent=!1;
    return C
    },
_generateMonthYearHeader:function(b,c,e,f,d,h,s,x){
    var i=this._get(b,"changeMonth"),B=this._get(b,"changeYear"),I=this._get(b,"showMonthAfterYear"),L='<div class="ui-datepicker-title">',M="";
    if(h||!i)M+='<span class="ui-datepicker-month">'+s[c]+"</span>";
    else{
        for(var s=f&&f.getFullYear()==e,m=d&&d.getFullYear()==e,M=M+('<select class="ui-datepicker-month" onchange="DP_jQuery_'+
            g+".datepicker._selectMonthYear('#"+b.id+"', this, 'M');\" >"),w=0;12>w;w++)if((!s||w>=f.getMonth())&&(!m||w<=d.getMonth()))M+='<option value="'+w+'"'+(w==c?' selected="selected"':"")+">"+x[w]+"</option>";M+="</select>"
        }
        I||(L+=M+(h||!i||!B?"&#xa0;":""));
    if(!b.yearshtml)if(b.yearshtml="",h||!B)L+='<span class="ui-datepicker-year">'+e+"</span>";
        else{
        var x=this._get(b,"yearRange").split(":"),n=(new Date).getFullYear(),s=function(b){
            b=b.match(/c[+-].*/)?e+parseInt(b.substring(1),10):b.match(/[+-].*/)?
            n+parseInt(b,10):parseInt(b,10);
            return isNaN(b)?n:b
            },c=s(x[0]),x=Math.max(c,s(x[1]||"")),c=f?Math.max(c,f.getFullYear()):c,x=d?Math.min(x,d.getFullYear()):x;
        for(b.yearshtml+='<select class="ui-datepicker-year" onchange="DP_jQuery_'+g+".datepicker._selectMonthYear('#"+b.id+"', this, 'Y');\" >";c<=x;c++)b.yearshtml+='<option value="'+c+'"'+(c==e?' selected="selected"':"")+">"+c+"</option>";
        b.yearshtml+="</select>";
        L+=b.yearshtml;
        b.yearshtml=null
        }
        L+=this._get(b,"yearSuffix");
    I&&(L+=(h||!i||!B?"&#xa0;":
        "")+M);
    return L+"</div>"
    },
_adjustInstDate:function(b,c,e){
    var f=b.drawYear+("Y"==e?c:0),d=b.drawMonth+("M"==e?c:0),c=Math.min(b.selectedDay,this._getDaysInMonth(f,d))+("D"==e?c:0),f=this._restrictMinMax(b,this._daylightSavingAdjust(new Date(f,d,c)));
    b.selectedDay=f.getDate();
    b.drawMonth=b.selectedMonth=f.getMonth();
    b.drawYear=b.selectedYear=f.getFullYear();
    ("M"==e||"Y"==e)&&this._notifyChange(b)
    },
_restrictMinMax:function(b,c){
    var e=this._getMinMaxDate(b,"min"),f=this._getMinMaxDate(b,"max"),e=e&&
    c<e?e:c;
    return f&&e>f?f:e
    },
_notifyChange:function(b){
    var c=this._get(b,"onChangeMonthYear");
    c&&c.apply(b.input?b.input[0]:null,[b.selectedYear,b.selectedMonth+1,b])
    },
_getNumberOfMonths:function(b){
    b=this._get(b,"numberOfMonths");
    return null==b?[1,1]:"number"==typeof b?[1,b]:b
    },
_getMinMaxDate:function(b,c){
    return this._determineDate(b,this._get(b,c+"Date"),null)
    },
_getDaysInMonth:function(b,c){
    return 32-this._daylightSavingAdjust(new Date(b,c,32)).getDate()
    },
_getFirstDayOfMonth:function(b,c){
    return(new Date(b,
        c,1)).getDay()
    },
_canAdjustMonth:function(b,c,e,f){
    var d=this._getNumberOfMonths(b),e=this._daylightSavingAdjust(new Date(e,f+(0>c?c:d[0]*d[1]),1));
    0>c&&e.setDate(this._getDaysInMonth(e.getFullYear(),e.getMonth()));
    return this._isInRange(b,e)
    },
_isInRange:function(b,c){
    var e=this._getMinMaxDate(b,"min"),f=this._getMinMaxDate(b,"max");
    return(!e||c.getTime()>=e.getTime())&&(!f||c.getTime()<=f.getTime())
    },
_getFormatConfig:function(b){
    var c=this._get(b,"shortYearCutoff"),c="string"!=typeof c?c:(new Date).getFullYear()%
    100+parseInt(c,10);
    return{
        shortYearCutoff:c,
        dayNamesShort:this._get(b,"dayNamesShort"),
        dayNames:this._get(b,"dayNames"),
        monthNamesShort:this._get(b,"monthNamesShort"),
        monthNames:this._get(b,"monthNames")
        }
    },
_formatDate:function(b,c,e,f){
    c||(b.currentDay=b.selectedDay,b.currentMonth=b.selectedMonth,b.currentYear=b.selectedYear);
    c=c?"object"==typeof c?c:this._daylightSavingAdjust(new Date(f,e,c)):this._daylightSavingAdjust(new Date(b.currentYear,b.currentMonth,b.currentDay));
    return this.formatDate(this._get(b,
        "dateFormat"),c,this._getFormatConfig(b))
    }
});
d.fn.datepicker=function(b){
    if(!this.length)return this;
    d.datepicker.initialized||(d(document).mousedown(d.datepicker._checkExternalClick).find("body").append(d.datepicker.dpDiv),d.datepicker.initialized=!0);
    var c=Array.prototype.slice.call(arguments,1);
    return"string"==typeof b&&("isDisabled"==b||"getDate"==b||"widget"==b)||"option"==b&&2==arguments.length&&"string"==typeof arguments[1]?d.datepicker["_"+b+"Datepicker"].apply(d.datepicker,[this[0]].concat(c)):
    this.each(function(){
        "string"==typeof b?d.datepicker["_"+b+"Datepicker"].apply(d.datepicker,[this].concat(c)):d.datepicker._attachDatepicker(this,b)
        })
    };
    
d.datepicker=new b;
d.datepicker.initialized=!1;
d.datepicker.uuid=(new Date).getTime();
d.datepicker.version="1.8.16";
y["DP_jQuery_"+g]=d
}(jQuery);
C("jquery.cookie")&&(jQuery.cookie=function(d,c,b){
    if("undefined"!=typeof c){
        b=b||{};
        
        null===c&&(c="",b.expires=-1);
        var e="";
        if(b.expires&&("number"==typeof b.expires||b.expires.toUTCString))"number"==typeof b.expires?
            (e=new Date,e.setTime(e.getTime()+864E5*b.expires)):e=b.expires,e="; expires="+e.toUTCString();
        var f=b.path?"; path="+b.path:"",g=b.domain?"; domain="+b.domain:"",b=b.secure?"; secure":"";
        document.cookie=[d,"=",encodeURIComponent(c),e,f,g,b].join("")
        }else{
        c=null;
        if(document.cookie&&""!=document.cookie){
            b=document.cookie.split(";");
            for(e=0;e<b.length;e++)if(f=jQuery.trim(b[e]),f.substring(0,d.length+1)==d+"="){
                c=decodeURIComponent(f.substring(d.length+1));
                break
            }
            }
            return c
    }
});
C("json2")&&(this.JSON||
    (this.JSON={}),function(){
        function d(b){
            return 10>b?"0"+b:b
            }
            function c(b){
            f.lastIndex=0;
            return f.test(b)?'"'+b.replace(f,function(b){
                var c=j[b];
                return"string"===typeof c?c:"\\u"+("0000"+b.charCodeAt(0).toString(16)).slice(-4)
                })+'"':'"'+b+'"'
            }
            function b(e,f){
            var d,j,s,x,i=g,B,I=f[e];
            I&&"object"===typeof I&&"function"===typeof I.toJSON&&(I=I.toJSON(e));
            "function"===typeof l&&(I=l.call(f,e,I));
            switch(typeof I){
                case "string":
                    return c(I);
                case "number":
                    return isFinite(I)?""+I:"null";
                case "boolean":case "null":
                    return""+
                    I;
                case "object":
                    if(!I)return"null";
                    g+=h;
                    B=[];
                    if("[object Array]"===Object.prototype.toString.apply(I)){
                    x=I.length;
                    for(d=0;d<x;d+=1)B[d]=b(d,I)||"null";
                    s=0===B.length?"[]":g?"[\n"+g+B.join(",\n"+g)+"\n"+i+"]":"["+B.join(",")+"]";
                    g=i;
                    return s
                    }
                    if(l&&"object"===typeof l){
                    x=l.length;
                    for(d=0;d<x;d+=1)j=l[d],"string"===typeof j&&(s=b(j,I))&&B.push(c(j)+(g?": ":":")+s)
                        }else for(j in I)Object.hasOwnProperty.call(I,j)&&(s=b(j,I))&&B.push(c(j)+(g?": ":":")+s);s=0===B.length?"{}":g?"{\n"+g+B.join(",\n"+g)+"\n"+
                    i+"}":"{"+B.join(",")+"}";
                    g=i;
                    return s
                    }
                }
        "function"!==typeof Date.prototype.toJSON&&(Date.prototype.toJSON=function(){
        return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+d(this.getUTCMonth()+1)+"-"+d(this.getUTCDate())+"T"+d(this.getUTCHours())+":"+d(this.getUTCMinutes())+":"+d(this.getUTCSeconds())+"Z":null
        },String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){
        return this.valueOf()
        });
    var e=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
    f=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,g,h,j={
        "\u0008":"\\b",
        "\t":"\\t",
        "\n":"\\n",
        "\u000c":"\\f",
        "\r":"\\r",
        '"':'\\"',
        "\\":"\\\\"
    },l;
    "function"!==typeof JSON.stringify&&(JSON.stringify=function(c,e,f){
        var d;
        h=g="";
        if("number"===typeof f)for(d=0;d<f;d+=1)h+=" ";else"string"===typeof f&&(h=f);
        if((l=e)&&"function"!==typeof e&&("object"!==typeof e||"number"!==typeof e.length))throw Error("JSON.stringify");
        return b("",

        {
            "":c
        })
        });
    "function"!==typeof JSON.parse&&(JSON.parse=function(b,c){
        function f(b,e){
            var d,g,j=b[e];
            if(j&&"object"===typeof j)for(d in j)Object.hasOwnProperty.call(j,d)&&(g=f(j,d),void 0!==g?j[d]=g:delete j[d]);return c.call(b,e,j)
            }
            var d,b=""+b;
        e.lastIndex=0;
        e.test(b)&&(b=b.replace(e,function(b){
            return"\\u"+("0000"+b.charCodeAt(0).toString(16)).slice(-4)
            }));
        if(/^[\],:{}\s]*$/.test(b.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
            "]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return d=eval("("+b+")"),"function"===typeof c?f({
            "":d
        },""):d;
        throw new SyntaxError("JSON.parse");
    })
    }());
C("date")&&(Date.CultureInfo={
    name:"en-US",
    englishName:"English (United States)",
    nativeName:"English (United States)",
    dayNames:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),
    abbreviatedDayNames:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(","),
    shortestDayNames:"Su,Mo,Tu,We,Th,Fr,Sa".split(","),
    firstLetterDayNames:"S,M,T,W,T,F,S".split(","),
    monthNames:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),
    abbreviatedMonthNames:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),
    amDesignator:"AM",
    pmDesignator:"PM",
    firstDayOfWeek:0,
    twoDigitYearMax:2029,
    dateElementOrder:"mdy",
    formatPatterns:{
        shortDate:"M/d/yyyy",
        longDate:"dddd, MMMM dd, yyyy",
        shortTime:"h:mm tt",
        longTime:"h:mm:ss tt",
        fullDateTime:"dddd, MMMM dd, yyyy h:mm:ss tt",
        sortableDateTime:"yyyy-MM-ddTHH:mm:ss",
        universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",
        rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",
        monthDay:"MMMM dd",
        yearMonth:"MMMM, yyyy"
    },
    regexPatterns:{
        jan:/^jan(uary)?/i,
        feb:/^feb(ruary)?/i,
        mar:/^mar(ch)?/i,
        apr:/^apr(il)?/i,
        may:/^may/i,
        jun:/^jun(e)?/i,
        jul:/^jul(y)?/i,
        aug:/^aug(ust)?/i,
        sep:/^sep(t(ember)?)?/i,
        oct:/^oct(ober)?/i,
        nov:/^nov(ember)?/i,
        dec:/^dec(ember)?/i,
        sun:/^su(n(day)?)?/i,
        mon:/^mo(n(day)?)?/i,
        tue:/^tu(e(s(day)?)?)?/i,
        wed:/^we(d(nesday)?)?/i,
        thu:/^th(u(r(s(day)?)?)?)?/i,
        fri:/^fr(i(day)?)?/i,
        sat:/^sa(t(urday)?)?/i,
        future:/^next/i,
        past:/^last|past|prev(ious)?/i,
        add:/^(\+|aft(er)?|from|hence)/i,
        subtract:/^(\-|bef(ore)?|ago)/i,
        yesterday:/^yes(terday)?/i,
        today:/^t(od(ay)?)?/i,
        tomorrow:/^tom(orrow)?/i,
        now:/^n(ow)?/i,
        millisecond:/^ms|milli(second)?s?/i,
        second:/^sec(ond)?s?/i,
        minute:/^mn|min(ute)?s?/i,
        hour:/^h(our)?s?/i,
        week:/^w(eek)?s?/i,
        month:/^m(onth)?s?/i,
        day:/^d(ay)?s?/i,
        year:/^y(ear)?s?/i,
        shortMeridian:/^(a|p)/i,
        longMeridian:/^(a\.?m?\.?|p\.?m?\.?)/i,
        timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\s*(\+|\-)\s*\d\d\d\d?)|gmt|utc)/i,
        ordinalSuffix:/^\s*(st|nd|rd|th)/i,
        timeContext:/^\s*(\:|a(?!u|p)|p)/i
    },
    timezones:[{
        name:"UTC",
        offset:"-000"
    },{
        name:"GMT",
        offset:"-000"
    },{
        name:"EST",
        offset:"-0500"
    },{
        name:"EDT",
        offset:"-0400"
    },{
        name:"CST",
        offset:"-0600"
    },{
        name:"CDT",
        offset:"-0500"
    },{
        name:"MST",
        offset:"-0700"
    },{
        name:"MDT",
        offset:"-0600"
    },{
        name:"PST",
        offset:"-0800"
    },{
        name:"PDT",
        offset:"-0700"
    }]
    },function(){
    var d=Date,c=d.prototype,b=d.CultureInfo,e=function(b,c){
        c||(c=2);
        return("000"+b).slice(-1*c)
        };
        
    c.clearTime=function(){
        this.setHours(0);
        this.setMinutes(0);
        this.setSeconds(0);
        this.setMilliseconds(0);
        return this
        };
        
    c.setTimeToNow=function(){
        var b=new Date;
        this.setHours(b.getHours());
        this.setMinutes(b.getMinutes());
        this.setSeconds(b.getSeconds());
        this.setMilliseconds(b.getMilliseconds());
        return this
        };
        
    d.today=function(){
        return(new Date).clearTime()
        };
        
    d.compare=function(b,c){
        if(isNaN(b)||isNaN(c))throw Error(b+" - "+c);
        if(b instanceof Date&&c instanceof Date)return b<c?-1:b>c?1:0;
        throw new TypeError(b+" - "+c);
    };
    
    d.equals=function(b,c){
        return 0===b.compareTo(c)
        };
        
    d.getDayNumberFromName=
    function(c){
        for(var e=b.dayNames,f=b.abbreviatedDayNames,d=b.shortestDayNames,c=c.toLowerCase(),g=0;g<e.length;g++)if(e[g].toLowerCase()==c||f[g].toLowerCase()==c||d[g].toLowerCase()==c)return g;return-1
        };
        
    d.getMonthNumberFromName=function(c){
        for(var e=b.monthNames,f=b.abbreviatedMonthNames,c=c.toLowerCase(),d=0;d<e.length;d++)if(e[d].toLowerCase()==c||f[d].toLowerCase()==c)return d;return-1
        };
        
    d.isLeapYear=function(b){
        return 0===b%4&&0!==b%100||0===b%400
        };
        
    d.getDaysInMonth=function(b,c){
        return[31,d.isLeapYear(b)?
        29:28,31,30,31,30,31,31,30,31,30,31][c]
        };
        
    d.getTimezoneAbbreviation=function(c){
        for(var e=b.timezones,f=0;f<e.length;f++)if(e[f].offset===c)return e[f].name;return null
        };
        
    d.getTimezoneOffset=function(c){
        for(var e=b.timezones,f=0;f<e.length;f++)if(e[f].name===c.toUpperCase())return e[f].offset;return null
        };
        
    c.clone=function(){
        return new Date(this.getTime())
        };
        
    c.compareTo=function(b){
        return Date.compare(this,b)
        };
        
    c.equals=function(b){
        return Date.equals(this,b||new Date)
        };
        
    c.between=function(b,c){
        return this.getTime()>=
        b.getTime()&&this.getTime()<=c.getTime()
        };
        
    c.isAfter=function(b){
        return 1===this.compareTo(b||new Date)
        };
        
    c.isBefore=function(b){
        return-1===this.compareTo(b||new Date)
        };
        
    c.isToday=function(){
        return this.isSameDay(new Date)
        };
        
    c.isSameDay=function(b){
        return this.clone().clearTime().equals(b.clone().clearTime())
        };
        
    c.addMilliseconds=function(b){
        this.setMilliseconds(this.getMilliseconds()+b);
        return this
        };
        
    c.addSeconds=function(b){
        return this.addMilliseconds(1E3*b)
        };
        
    c.addMinutes=function(b){
        return this.addMilliseconds(6E4*
            b)
        };
        
    c.addHours=function(b){
        return this.addMilliseconds(36E5*b)
        };
        
    c.addDays=function(b){
        this.setDate(this.getDate()+b);
        return this
        };
        
    c.addWeeks=function(b){
        return this.addDays(7*b)
        };
        
    c.addMonths=function(b){
        var c=this.getDate();
        this.setDate(1);
        this.setMonth(this.getMonth()+b);
        this.setDate(Math.min(c,d.getDaysInMonth(this.getFullYear(),this.getMonth())));
        return this
        };
        
    c.addYears=function(b){
        return this.addMonths(12*b)
        };
        
    c.add=function(b){
        if("number"==typeof b)return this._orient=b,this;
        b.milliseconds&&this.addMilliseconds(b.milliseconds);
        b.seconds&&this.addSeconds(b.seconds);
        b.minutes&&this.addMinutes(b.minutes);
        b.hours&&this.addHours(b.hours);
        b.weeks&&this.addWeeks(b.weeks);
        b.months&&this.addMonths(b.months);
        b.years&&this.addYears(b.years);
        b.days&&this.addDays(b.days);
        return this
        };
        
    var f,g,h;
    c.getWeek=function(){
        var b,c,e,d,i;
        f=!f?this.getFullYear():f;
        g=!g?this.getMonth()+1:g;
        h=!h?this.getDate():h;
        2>=g?(b=f-1,c=(b/4|0)-(b/100|0)+(b/400|0),i=c-(((b-1)/4|0)-((b-1)/100|0)+((b-1)/400|0)),e=0,d=h-1+31*(g-1)):(b=f,c=(b/4|0)-(b/100|0)+(b/
            400|0),i=c-(((b-1)/4|0)-((b-1)/100|0)+((b-1)/400|0)),e=i+1,d=h+(153*(g-3)+2)/5+58+i);
        b=(b+c)%7;
        e=d+3-(d+b-e)%7|0;
        f=g=h=null;
        return 0>e?53-((b-i)/5|0):e>364+i?1:(e/7|0)+1
        };
        
    c.getISOWeek=function(){
        f=this.getUTCFullYear();
        g=this.getUTCMonth()+1;
        h=this.getUTCDate();
        return e(this.getWeek())
        };
        
    c.setWeek=function(b){
        return this.moveToDayOfWeek(1).addWeeks(b-this.getWeek())
        };
        
    d._validate=function(b,c,e,f){
        if("undefined"==typeof b)return!1;
        if("number"!=typeof b)throw new TypeError(b+" is not a Number.");
        if(b<
            c||b>e)throw new RangeError(b+" is not a valid value for "+f+".");
        return!0
        };
        
    d.validateMillisecond=function(b){
        return d._validate(b,0,999,"millisecond")
        };
        
    d.validateSecond=function(b){
        return d._validate(b,0,59,"second")
        };
        
    d.validateMinute=function(b){
        return d._validate(b,0,59,"minute")
        };
        
    d.validateHour=function(b){
        return d._validate(b,0,23,"hour")
        };
        
    d.validateDay=function(b,c,e){
        return d._validate(b,1,d.getDaysInMonth(c,e),"day")
        };
        
    d.validateMonth=function(b){
        return d._validate(b,0,11,"month")
        };
        
    d.validateYear=
    function(b){
        return d._validate(b,0,9999,"year")
        };
        
    c.set=function(b){
        d.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());
        d.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());
        d.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());
        d.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());
        d.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());
        d.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());
        d.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());
        b.timezone&&this.setTimezone(b.timezone);
        b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);
        b.week&&d._validate(b.week,0,53,"week")&&this.setWeek(b.week);
        return this
        };
        
    c.moveToFirstDayOfMonth=function(){
        return this.set({
            day:1
        })
        };
        
    c.moveToLastDayOfMonth=function(){
        return this.set({
            day:d.getDaysInMonth(this.getFullYear(),this.getMonth())
            })
        };
        
    c.moveToNthOccurrence=function(b,c){
        var e=0;
        if(0<c)e=c-1;
        else if(-1===
            c)return this.moveToLastDayOfMonth(),this.getDay()!==b&&this.moveToDayOfWeek(b,-1),this;
        return this.moveToFirstDayOfMonth().addDays(-1).moveToDayOfWeek(b,1).addWeeks(e)
        };
        
    c.moveToDayOfWeek=function(b,c){
        var e=(b-this.getDay()+7*(c||1))%7;
        return this.addDays(0===e?e+7*(c||1):e)
        };
        
    c.moveToMonth=function(b,c){
        var e=(b-this.getMonth()+12*(c||1))%12;
        return this.addMonths(0===e?e+12*(c||1):e)
        };
        
    c.getOrdinalNumber=function(){
        return Math.ceil((this.clone().clearTime()-new Date(this.getFullYear(),0,1))/864E5)+
        1
        };
        
    c.getTimezone=function(){
        return d.getTimezoneAbbreviation(this.getUTCOffset())
        };
        
    c.setTimezoneOffset=function(b){
        var c=this.getTimezoneOffset();
        return this.addMinutes(-6*Number(b)/10-c)
        };
        
    c.setTimezone=function(b){
        return this.setTimezoneOffset(d.getTimezoneOffset(b))
        };
        
    c.hasDaylightSavingTime=function(){
        return Date.today().set({
            month:0,
            day:1
        }).getTimezoneOffset()!==Date.today().set({
            month:6,
            day:1
        }).getTimezoneOffset()
        };
        
    c.isDaylightSavingTime=function(){
        return this.hasDaylightSavingTime()&&(new Date).getTimezoneOffset()===
        Date.today().set({
            month:6,
            day:1
        }).getTimezoneOffset()
        };
        
    c.getUTCOffset=function(){
        var b=-10*this.getTimezoneOffset()/6;
        if(0>b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);
        b=(b+1E4).toString();
        return"+"+b.substr(1)
        };
        
    c.getElapsed=function(b){
        return(b||new Date)-this
        };
        
    c.toISOString||(c.toISOString=function(){
        function b(c){
            return 10>c?"0"+c:c
            }
            return'"'+this.getUTCFullYear()+"-"+b(this.getUTCMonth()+1)+"-"+b(this.getUTCDate())+"T"+b(this.getUTCHours())+":"+b(this.getUTCMinutes())+":"+b(this.getUTCSeconds())+
        'Z"'
        });
    c._toString=c.toString;
    c.toString=function(c){
        var f=this;
        if(c&&1==c.length){
            var d=b.formatPatterns;
            f.t=f.toString;
            switch(c){
                case "d":
                    return f.t(d.shortDate);
                case "D":
                    return f.t(d.longDate);
                case "F":
                    return f.t(d.fullDateTime);
                case "m":
                    return f.t(d.monthDay);
                case "r":
                    return f.t(d.rfc1123);
                case "s":
                    return f.t(d.sortableDateTime);
                case "t":
                    return f.t(d.shortTime);
                case "T":
                    return f.t(d.longTime);
                case "u":
                    return f.t(d.universalSortableDateTime);
                case "y":
                    return f.t(d.yearMonth)
                    }
                }
        var g=function(b){
        switch(1*
            b){
        case 1:case 21:case 31:
            return"st";
            case 2:case 22:
            return"nd";
            case 3:case 23:
            return"rd";
            default:
            return"th"
            }
        };
    
return c?c.replace(/(\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S)/g,function(c){
    if("\\"===c.charAt(0))return c.replace("\\","");
    f.h=f.getHours;
    switch(c){
        case "hh":
            return e(13>f.h()?0===f.h()?12:f.h():f.h()-12);
        case "h":
            return 13>f.h()?0===f.h()?12:f.h():f.h()-12;
        case "HH":
            return e(f.h());
        case "H":
            return f.h();
        case "mm":
            return e(f.getMinutes());
        case "m":
            return f.getMinutes();
        case "ss":
            return e(f.getSeconds());
        case "s":
            return f.getSeconds();
        case "yyyy":
            return e(f.getFullYear(),4);
        case "yy":
            return e(f.getFullYear());
        case "dddd":
            return b.dayNames[f.getDay()];
        case "ddd":
            return b.abbreviatedDayNames[f.getDay()];
        case "dd":
            return e(f.getDate());
        case "d":
            return f.getDate();
        case "MMMM":
            return b.monthNames[f.getMonth()];
        case "MMM":
            return b.abbreviatedMonthNames[f.getMonth()];
        case "MM":
            return e(f.getMonth()+1);
        case "M":
            return f.getMonth()+1;
        case "t":
            return 12>f.h()?b.amDesignator.substring(0,1):b.pmDesignator.substring(0,
            1);
        case "tt":
            return 12>f.h()?b.amDesignator:b.pmDesignator;
        case "S":
            return g(f.getDate());
        default:
            return c
            }
        }):this._toString()
}
}(),function(){
    var d=Date,c=d.prototype,b=d.CultureInfo,e=Number.prototype;
    c._orient=1;
    c._nth=null;
    c._is=!1;
    c._same=!1;
    c._isSecond=!1;
    e._dateElement="day";
    c.next=function(){
        this._orient=1;
        return this
        };
        
    d.next=function(){
        return d.today().next()
        };
        
    c.last=c.prev=c.previous=function(){
        this._orient=-1;
        return this
        };
        
    d.last=d.prev=d.previous=function(){
        return d.today().last()
        };
        
    c.is=
    function(){
        this._is=!0;
        return this
        };
        
    c.same=function(){
        this._same=!0;
        this._isSecond=!1;
        return this
        };
        
    c.today=function(){
        return this.same().day()
        };
        
    c.weekday=function(){
        return this._is?(this._is=!1,!this.is().sat()&&!this.is().sun()):!1
        };
        
    c.at=function(b){
        return"string"===typeof b?d.parse(this.toString("d")+" "+b):this.set(b)
        };
        
    e.fromNow=e.after=function(b){
        var c={};
        
        c[this._dateElement]=this;
        return(!b?new Date:b.clone()).add(c)
        };
        
    e.ago=e.before=function(b){
        var c={};
        
        c[this._dateElement]=-1*this;
        return(!b?
            new Date:b.clone()).add(c)
        };
        
    var f="sunday monday tuesday wednesday thursday friday saturday".split(/\s/),g="january february march april may june july august september october november december".split(/\s/),h="Millisecond Second Minute Hour Day Week Month Year".split(/\s/),j="Milliseconds Seconds Minutes Hours Date Week Month FullYear".split(/\s/),l="final first second third fourth fifth".split(/\s/);
    c.toObject=function(){
        for(var b={},c=0;c<h.length;c++)b[h[c].toLowerCase()]=this["get"+j[c]]();
        return b
        };
    d.fromObject=function(b){
        b.week=null;
        return Date.today().set(b)
        };
        
    for(var o=function(b){
        return function(){
            if(this._is)return this._is=!1,this.getDay()==b;
            if(null!==this._nth){
                this._isSecond&&this.addSeconds(-1*this._orient);
                this._isSecond=!1;
                var c=this._nth;
                this._nth=null;
                var e=this.clone().moveToLastDayOfMonth();
                this.moveToNthOccurrence(b,c);
                if(this>e)throw new RangeError(d.getDayName(b)+" does not occur "+c+" times in the month of "+d.getMonthName(e.getMonth())+" "+e.getFullYear()+".");
                return this
                }
                return this.moveToDayOfWeek(b,
                this._orient)
            }
        },i=function(c){
        return function(){
            var e=d.today(),f=c-e.getDay();
            0===c&&1===b.firstDayOfWeek&&0!==e.getDay()&&(f+=7);
            return e.addDays(f)
            }
        },A=0;A<f.length;A++)d[f[A].toUpperCase()]=d[f[A].toUpperCase().substring(0,3)]=A,d[f[A]]=d[f[A].substring(0,3)]=i(A),c[f[A]]=c[f[A].substring(0,3)]=o(A);
f=function(b){
    return function(){
        return this._is?(this._is=!1,this.getMonth()===b):this.moveToMonth(b,this._orient)
        }
    };

o=function(b){
    return function(){
        return d.today().set({
            month:b,
            day:1
        })
        }
    };

for(i=0;i<
    g.length;i++)d[g[i].toUpperCase()]=d[g[i].toUpperCase().substring(0,3)]=i,d[g[i]]=d[g[i].substring(0,3)]=o(i),c[g[i]]=c[g[i].substring(0,3)]=f(i);
f=function(b){
    return function(c){
        if(this._isSecond)return this._isSecond=!1,this;
        if(this._same){
            this._same=this._is=!1;
            for(var e=this.toObject(),c=(c||new Date).toObject(),f="",d=b.toLowerCase(),g=h.length-1;-1<g;g--){
                f=h[g].toLowerCase();
                if(e[f]!=c[f])return!1;
                if(d==f)break
            }
            return!0
            }
            "s"!=b.substring(b.length-1)&&(b+="s");
        return this["add"+b](this._orient)
        }
    };
o=function(b){
    return function(){
        this._dateElement=b;
        return this
        }
    };

for(i=0;i<h.length;i++)g=h[i].toLowerCase(),c[g]=c[g+"s"]=f(h[i]),e[g]=e[g+"s"]=o(g);
c._ss=f("Second");
e=function(b){
    return function(c){
        if(this._same)return this._ss(c);
        if(c||0===c)return this.moveToNthOccurrence(c,b);
        this._nth=b;
        return 2===b&&(void 0===c||null===c)?(this._isSecond=!0,this.addSeconds(this._orient)):this
        }
    };

for(g=0;g<l.length;g++)c[l[g]]=0===g?e(-1):e(g)
    }(),function(){
    Date.Parsing={
        Exception:function(b){
            this.message=
            "Parse error at '"+b.substring(0,10)+" ...'"
            }
        };
    
for(var d=Date.Parsing,c=d.Operators={
    rtoken:function(b){
        return function(c){
            var e=c.match(b);
            if(e)return[e[0],c.substring(e[0].length)];
            throw new d.Exception(c);
        }
    },
token:function(){
    return function(b){
        return c.rtoken(RegExp("^s*"+b+"s*"))(b)
        }
    },
stoken:function(b){
    return c.rtoken(RegExp("^"+b))
    },
until:function(b){
    return function(c){
        for(var e=[],f=null;c.length;){
            try{
                f=b.call(this,c)
                }catch(d){
                e.push(f[0]);
                c=f[1];
                continue
            }
            break
        }
        return[e,c]
        }
    },
many:function(b){
    return function(c){
        for(var e=
            [],f=null;c.length;){
            try{
                f=b.call(this,c)
                }catch(d){
                break
            }
            e.push(f[0]);
            c=f[1]
            }
            return[e,c]
        }
    },
optional:function(b){
    return function(c){
        var e=null;
        try{
            e=b.call(this,c)
            }catch(f){
            return[null,c]
            }
            return[e[0],e[1]]
        }
    },
not:function(b){
    return function(c){
        try{
            b.call(this,c)
            }catch(e){
            return[null,c]
            }
            throw new d.Exception(c);
    }
},
ignore:function(b){
    return b?function(c){
        var e=null,e=b.call(this,c);
        return[null,e[1]]
        }:null
    },
product:function(){
    for(var b=arguments[0],e=Array.prototype.slice.call(arguments,1),f=[],d=0;d<
        b.length;d++)f.push(c.each(b[d],e));
    return f
    },
cache:function(b){
    var c={},e=null;
    return function(f){
        try{
            e=c[f]=c[f]||b.call(this,f)
            }catch(o){
            e=c[f]=o
            }
            if(e instanceof d.Exception)throw e;
        return e
        }
    },
any:function(){
    var b=arguments;
    return function(c){
        for(var e=null,f=0;f<b.length;f++)if(null!=b[f]){
            try{
                e=b[f].call(this,c)
                }catch(o){
                e=null
                }
                if(e)return e
                }
                throw new d.Exception(c);
    }
},
each:function(){
    var b=arguments;
    return function(c){
        for(var e=[],f=null,o=0;o<b.length;o++)if(null!=b[o]){
            try{
                f=b[o].call(this,
                    c)
                }catch(i){
                throw new d.Exception(c);
            }
            e.push(f[0]);
            c=f[1]
            }
            return[e,c]
        }
    },
all:function(){
    var b=b;
    return b.each(b.optional(arguments))
    },
sequence:function(b,e,f){
    e=e||c.rtoken(/^\s*/);
    f=f||null;
    return 1==b.length?b[0]:function(c){
        for(var o=null,i=null,A=[],G=0;G<b.length;G++){
            try{
                o=b[G].call(this,c)
                }catch(s){
                break
            }
            A.push(o[0]);
            try{
                i=e.call(this,o[1])
                }catch(x){
                i=null;
                break
            }
            c=i[1]
            }
            if(!o)throw new d.Exception(c);
        if(i)throw new d.Exception(i[1]);
        if(f)try{
            o=f.call(this,o[1])
            }catch(H){
            throw new d.Exception(o[1]);
        }
        return[A,o?o[1]:c]
        }
    },
between:function(b,e,f){
    var f=f||b,d=c.each(c.ignore(b),e,c.ignore(f));
    return function(b){
        b=d.call(this,b);
        return[[b[0][0],r[0][2]],b[1]]
        }
    },
list:function(b,e,f){
    e=e||c.rtoken(/^\s*/);
    f=f||null;
    return b instanceof Array?c.each(c.product(b.slice(0,-1),c.ignore(e)),b.slice(-1),c.ignore(f)):c.each(c.many(c.each(b,c.ignore(e))),px,c.ignore(f))
    },
set:function(b,e,f){
    e=e||c.rtoken(/^\s*/);
    f=f||null;
    return function(l){
        for(var o=null,i=o=null,A=null,G=[[],l],s=!1,x=0;x<b.length;x++){
            o=
            i=null;
            s=1==b.length;
            try{
                o=b[x].call(this,l)
                }catch(H){
                continue
            }
            A=[[o[0]],o[1]];
            if(0<o[1].length&&!s)try{
                i=e.call(this,o[1])
                }catch(B){
                s=!0
                }else s=!0;
            !s&&0===i[1].length&&(s=!0);
            if(!s){
                o=[];
                for(s=0;s<b.length;s++)x!=s&&o.push(b[s]);
                o=c.set(o,e).call(this,i[1]);
                0<o[0].length&&(A[0]=A[0].concat(o[0]),A[1]=o[1])
                }
                A[1].length<G[1].length&&(G=A);
            if(0===G[1].length)break
        }
        if(0===G[0].length)return G;
        if(f){
            try{
                i=f.call(this,G[1])
                }catch(I){
                throw new d.Exception(G[1]);
            }
            G[1]=i[1]
            }
            return G
        }
    },
forward:function(b,
    c){
    return function(e){
        return b[c].call(this,e)
        }
    },
replace:function(b,c){
    return function(e){
        e=b.call(this,e);
        return[c,e[1]]
        }
    },
process:function(b,c){
    return function(e){
        e=b.call(this,e);
        return[c.call(this,e[0]),e[1]]
        }
    },
min:function(b,c){
    return function(e){
        var f=c.call(this,e);
        if(f[0].length<b)throw new d.Exception(e);
        return f
        }
    }
},b=function(b){
    return function(){
        var c=null,e=[];
        1<arguments.length?c=Array.prototype.slice.call(arguments):arguments[0]instanceof Array&&(c=arguments[0]);
        if(c)for(var f=c.shift();0<
            f.length;)return c.unshift(f[0]),e.push(b.apply(null,c)),c.shift(),e;else return b.apply(null,arguments)
            }
        },e="optional not ignore cache".split(/\s/),f=0;f<e.length;f++)c[e[f]]=b(c[e[f]]);
b=function(b){
    return function(){
        return arguments[0]instanceof Array?b.apply(null,arguments[0]):b.apply(null,arguments)
        }
    };

e="each any all".split(/\s/);
for(f=0;f<e.length;f++)c[e[f]]=b(c[e[f]])
    }(),function(){
    var d=Date,c=d.CultureInfo,b=function(c){
        for(var e=[],f=0;f<c.length;f++)c[f]instanceof Array?e=e.concat(b(c[f])):
            c[f]&&e.push(c[f]);
        return e
        };
        
    d.Grammar={};
    
    d.Translator={
        hour:function(b){
            return function(){
                this.hour=Number(b)
                }
            },
    minute:function(b){
        return function(){
            this.minute=Number(b)
            }
        },
second:function(b){
    return function(){
        this.second=Number(b)
        }
    },
meridian:function(b){
    return function(){
        this.meridian=b.slice(0,1).toLowerCase()
        }
    },
timezone:function(b){
    return function(){
        var c=b.replace(/[^\d\+\-]/g,"");
        c.length?this.timezoneOffset=Number(c):this.timezone=b.toLowerCase()
        }
    },
day:function(b){
    var c=b[0];
    return function(){
        this.day=
        Number(c.match(/\d+/)[0])
        }
    },
month:function(b){
    return function(){
        this.month=3==b.length?"jan feb mar apr may jun jul aug sep oct nov dec".indexOf(b)/4:Number(b)-1
        }
    },
year:function(b){
    return function(){
        var e=Number(b);
        this.year=2<b.length?e:e+(e+2E3<c.twoDigitYearMax?2E3:1900)
        }
    },
rday:function(b){
    return function(){
        switch(b){
            case "yesterday":
                this.days=-1;
                break;
            case "tomorrow":
                this.days=1;
                break;
            case "today":
                this.days=0;
                break;
            case "now":
                this.days=0,this.now=!0
                }
            }
},
finishExact:function(b){
    for(var b=b instanceof
        Array?b:[b],c=0;c<b.length;c++)b[c]&&b[c].call(this);
    b=new Date;
    if((this.hour||this.minute)&&!this.month&&!this.year&&!this.day)this.day=b.getDate();
    this.year||(this.year=b.getFullYear());
    !this.month&&0!==this.month&&(this.month=b.getMonth());
    this.day||(this.day=1);
    this.hour||(this.hour=0);
    this.minute||(this.minute=0);
    this.second||(this.second=0);
    this.meridian&&this.hour&&("p"==this.meridian&&12>this.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));
    if(this.day>d.getDaysInMonth(this.year,
        this.month))throw new RangeError(this.day+" is not a valid value for days.");
    b=new Date(this.year,this.month,this.day,this.hour,this.minute,this.second);
    this.timezone?b.set({
        timezone:this.timezone
        }):this.timezoneOffset&&b.set({
        timezoneOffset:this.timezoneOffset
        });
    return b
    },
finish:function(c){
    c=c instanceof Array?b(c):[c];
    if(0===c.length)return null;
    for(var e=0;e<c.length;e++)"function"==typeof c[e]&&c[e].call(this);
    c=d.today();
    if(this.now&&!this.unit&&!this.operator)return new Date;
    this.now&&(c=new Date);
    var e=!!(this.days&&null!==this.days||this.orient||this.operator),f,g,h;
    h="past"==this.orient||"subtract"==this.operator?-1:1;
    !this.now&&-1!="hour minute second".indexOf(this.unit)&&c.setTimeToNow();
    if((this.month||0===this.month)&&-1!="year day hour minute second".indexOf(this.unit))this.value=this.month+1,this.month=null,e=!0;
    !e&&this.weekday&&!this.day&&!this.days&&(f=Date[this.weekday](),this.day=f.getDate(),this.month||(this.month=f.getMonth()),this.year=f.getFullYear());
    e&&this.weekday&&"month"!=
    this.unit&&(this.unit="day",f=d.getDayNumberFromName(this.weekday)-c.getDay(),g=7,this.days=f?(f+h*g)%g:h*g);
    this.month&&"day"==this.unit&&this.operator&&(this.value=this.month+1,this.month=null);
    null!=this.value&&null!=this.month&&null!=this.year&&(this.day=1*this.value);
    this.month&&!this.day&&this.value&&(c.set({
        day:1*this.value
        }),e||(this.day=1*this.value));
    !this.month&&this.value&&"month"==this.unit&&!this.now&&(this.month=this.value,e=!0);
    if(e&&(this.month||0===this.month)&&"year"!=this.unit)this.unit=
        "month",f=this.month-c.getMonth(),g=12,this.months=f?(f+h*g)%g:h*g,this.month=null;
    this.unit||(this.unit="day");
    if(!this.value&&this.operator&&null!==this.operator&&this[this.unit+"s"]&&null!==this[this.unit+"s"])this[this.unit+"s"]=this[this.unit+"s"]+("add"==this.operator?1:-1)+(this.value||0)*h;
    else if(null==this[this.unit+"s"]||null!=this.operator)this.value||(this.value=1),this[this.unit+"s"]=this.value*h;
    this.meridian&&this.hour&&("p"==this.meridian&&12>this.hour?this.hour+=12:"a"==this.meridian&&
        12==this.hour&&(this.hour=0));
    this.weekday&&!this.day&&!this.days&&(f=Date[this.weekday](),this.day=f.getDate(),f.getMonth()!==c.getMonth()&&(this.month=f.getMonth()));
    if((this.month||0===this.month)&&!this.day)this.day=1;
    if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);
    e&&this.timezone&&this.day&&this.days&&(this.day=this.days);
    return e?c.add(this):c.set(this)
    }
};

var e=d.Parsing.Operators,f=d.Grammar,g=d.Translator,h;
f.datePartDelimiter=
e.rtoken(/^([\s\-\.\,\/\x27]+)/);
f.timePartDelimiter=e.stoken(":");
f.whiteSpace=e.rtoken(/^\s*/);
f.generalDelimiter=e.rtoken(/^(([\s\,]|at|@|on)+)/);
var j={};

f.ctoken=function(b){
    var f=j[b];
    if(!f){
        for(var f=c.regexPatterns,d=b.split(/\s+/),g=[],h=0;h<d.length;h++)g.push(e.replace(e.rtoken(f[d[h]]),d[h]));
        f=j[b]=e.any.apply(null,g)
        }
        return f
    };
    
f.ctoken2=function(b){
    return e.rtoken(c.regexPatterns[b])
    };
    
f.h=e.cache(e.process(e.rtoken(/^(0[0-9]|1[0-2]|[1-9])/),g.hour));
f.hh=e.cache(e.process(e.rtoken(/^(0[0-9]|1[0-2])/),
    g.hour));
f.H=e.cache(e.process(e.rtoken(/^([0-1][0-9]|2[0-3]|[0-9])/),g.hour));
f.HH=e.cache(e.process(e.rtoken(/^([0-1][0-9]|2[0-3])/),g.hour));
f.m=e.cache(e.process(e.rtoken(/^([0-5][0-9]|[0-9])/),g.minute));
f.mm=e.cache(e.process(e.rtoken(/^[0-5][0-9]/),g.minute));
f.s=e.cache(e.process(e.rtoken(/^([0-5][0-9]|[0-9])/),g.second));
f.ss=e.cache(e.process(e.rtoken(/^[0-5][0-9]/),g.second));
f.hms=e.cache(e.sequence([f.H,f.m,f.s],f.timePartDelimiter));
f.t=e.cache(e.process(f.ctoken2("shortMeridian"),g.meridian));
f.tt=e.cache(e.process(f.ctoken2("longMeridian"),g.meridian));
f.z=e.cache(e.process(e.rtoken(/^((\+|\-)\s*\d\d\d\d)|((\+|\-)\d\d\:?\d\d)/),g.timezone));
f.zz=e.cache(e.process(e.rtoken(/^((\+|\-)\s*\d\d\d\d)|((\+|\-)\d\d\:?\d\d)/),g.timezone));
f.zzz=e.cache(e.process(f.ctoken2("timezone"),g.timezone));
f.timeSuffix=e.each(e.ignore(f.whiteSpace),e.set([f.tt,f.zzz]));
f.time=e.each(e.optional(e.ignore(e.stoken("T"))),f.hms,f.timeSuffix);
f.d=e.cache(e.process(e.each(e.rtoken(/^([0-2]\d|3[0-1]|\d)/),e.optional(f.ctoken2("ordinalSuffix"))),
    g.day));
f.dd=e.cache(e.process(e.each(e.rtoken(/^([0-2]\d|3[0-1])/),e.optional(f.ctoken2("ordinalSuffix"))),g.day));
f.ddd=f.dddd=e.cache(e.process(f.ctoken("sun mon tue wed thu fri sat"),function(b){
    return function(){
        this.weekday=b
        }
    }));
f.M=e.cache(e.process(e.rtoken(/^(1[0-2]|0\d|\d)/),g.month));
f.MM=e.cache(e.process(e.rtoken(/^(1[0-2]|0\d)/),g.month));
f.MMM=f.MMMM=e.cache(e.process(f.ctoken("jan feb mar apr may jun jul aug sep oct nov dec"),g.month));
f.y=e.cache(e.process(e.rtoken(/^(\d\d?)/),g.year));
f.yy=e.cache(e.process(e.rtoken(/^(\d\d)/),g.year));
f.yyy=e.cache(e.process(e.rtoken(/^(\d\d?\d?\d?)/),g.year));
f.yyyy=e.cache(e.process(e.rtoken(/^(\d\d\d\d)/),g.year));
h=function(){
    return e.each(e.any.apply(null,arguments),e.not(f.ctoken2("timeContext")))
    };
    
f.day=h(f.d,f.dd);
f.month=h(f.M,f.MMM);
f.year=h(f.yyyy,f.yy);
f.orientation=e.process(f.ctoken("past future"),function(b){
    return function(){
        this.orient=b
        }
    });
f.operator=e.process(f.ctoken("add subtract"),function(b){
    return function(){
        this.operator=
        b
        }
    });
f.rday=e.process(f.ctoken("yesterday tomorrow today now"),g.rday);
f.unit=e.process(f.ctoken("second minute hour day week month year"),function(b){
    return function(){
        this.unit=b
        }
    });
f.value=e.process(e.rtoken(/^\d\d?(st|nd|rd|th)?/),function(b){
    return function(){
        this.value=b.replace(/\D/g,"")
        }
    });
f.expression=e.set([f.rday,f.operator,f.value,f.unit,f.orientation,f.ddd,f.MMM]);
h=function(){
    return e.set(arguments,f.datePartDelimiter)
    };
    
f.mdy=h(f.ddd,f.month,f.day,f.year);
f.ymd=h(f.ddd,f.year,f.month,
    f.day);
f.dmy=h(f.ddd,f.day,f.month,f.year);
f.date=function(b){
    return(f[c.dateElementOrder]||f.mdy).call(this,b)
    };
    
f.format=e.process(e.many(e.any(e.process(e.rtoken(/^(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|zz?z?)/),function(b){
    if(f[b])return f[b];
    throw d.Parsing.Exception(b);
}),e.process(e.rtoken(/^[^dMyhHmstz]+/),function(b){
    return e.ignore(e.stoken(b))
    }))),function(b){
    return e.process(e.each.apply(null,b),g.finishExact)
    });
var l={};

f.formats=function(b){
    if(b instanceof Array){
        for(var c=[],d=
            0;d<b.length;d++)c.push(l[b[d]]=l[b[d]]||f.format(b[d])[0]);
        return e.any.apply(null,c)
        }
        return l[b]=l[b]||f.format(b)[0]
    };
    
f._formats=f.formats('"yyyy-MM-ddTHH:mm:ssZ";yyyy-MM-ddTHH:mm:ssZ;yyyy-MM-ddTHH:mm:ssz;yyyy-MM-ddTHH:mm:ss;yyyy-MM-ddTHH:mmZ;yyyy-MM-ddTHH:mmz;yyyy-MM-ddTHH:mm;ddd, MMM dd, yyyy H:mm:ss tt;ddd MMM d yyyy HH:mm:ss zzz;MMddyyyy;ddMMyyyy;Mddyyyy;ddMyyyy;Mdyyyy;dMyyyy;yyyy;Mdyy;dMyy;d'.split(";"));
f._start=e.process(e.set([f.date,f.time,f.expression],f.generalDelimiter,f.whiteSpace),
    g.finish);
f.start=function(b){
    try{
        var c=f._formats.call({},b);
        if(0===c[1].length)return c
            }catch(e){}
    return f._start.call({},b)
    };
    
d._parse=d.parse;
d.parse=function(b){
    var c=null;
    if(!b)return null;
    if(b instanceof Date)return b;
    try{
        c=d.Grammar.start.call({},b.replace(/^\s*(\S*(\s+\S+)*)\s*$/,"$1"))
        }catch(e){
        return null
        }
        return 0===c[1].length?c[0]:null
    };
    
d.getParseFunction=function(b){
    var c=d.Grammar.formats(b);
    return function(b){
        var e=null;
        try{
            e=c.call({},b)
            }catch(f){
            return null
            }
            return 0===e[1].length?
        e[0]:null
        }
    };

d.parseExact=function(b,c){
    return d.getParseFunction(c)(b)
    }
}());
C("socket.io")&&(function(d,c){
    d.version="0.8.6";
    d.protocol=1;
    d.transports=[];
    d.j=[];
    d.sockets={};
    
    d.connect=function(b,e){
        var f=d.util.parseUri(b),g,h;
        c&&c.location&&(f.protocol=f.protocol||c.location.protocol.slice(0,-1),f.host=f.host||(c.document?c.document.domain:c.location.hostname),f.port=f.port||c.location.port);
        g=d.util.uniqueUri(f);
        var j={
            host:f.host,
            secure:"https"==f.protocol,
            port:f.port||("https"==f.protocol?443:
                80),
            query:f.query||""
            };
            
        d.util.merge(j,e);
        if(j["force new connection"]||!d.sockets[g])h=new d.Socket(j);
        !j["force new connection"]&&h&&(d.sockets[g]=h);
        h=h||d.sockets[g];
        return h.of(1<f.path.length?f.path:"")
        }
    }("object"===typeof module?module.exports:this.io={},this),function(d,c){
    var b=d.util={},e=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,f="source,protocol,authority,userInfo,user,password,host,port,relative,path,directory,file,query,anchor".split(",");
    b.parseUri=function(b){
        for(var b=e.exec(b||""),c={},d=14;d--;)c[f[d]]=b[d]||"";
        return c
        };
        
    b.uniqueUri=function(b){
        var e=b.protocol,f=b.host,b=b.port;
        "document"in c?(f=f||document.domain,b=b||("https"==e&&"https:"!==document.location.protocol?443:document.location.port)):(f=f||"localhost",!b&&"https"==e&&(b=443));
        return(e||"http")+"://"+f+":"+(b||80)
        };
        
    b.query=function(c,e){
        var f=b.chunkQuery(c||""),d=[];
        b.merge(f,b.chunkQuery(e||""));
        for(var g in f)f.hasOwnProperty(g)&&d.push(g+"="+f[g]);return d.length?
        "?"+d.join("&"):""
        };
        
    b.chunkQuery=function(b){
        for(var c={},b=b.split("&"),e=0,f=b.length,d;e<f;++e)d=b[e].split("="),d[0]&&(c[d[0]]=decodeURIComponent(d[1]));
        return c
        };
        
    var g=!1;
    b.load=function(e){
        if("document"in c&&"complete"===document.readyState||g)return e();
        b.on(c,"load",e,!1)
        };
        
    b.on=function(b,c,e,f){
        b.attachEvent?b.attachEvent("on"+c,e):b.addEventListener&&b.addEventListener(c,e,f)
        };
        
    b.request=function(c){
        if(c&&"undefined"!=typeof XDomainRequest)return new XDomainRequest;
        if("undefined"!=typeof XMLHttpRequest&&
            (!c||b.ua.hasCORS))return new XMLHttpRequest;
        if(!c)try{
            return new ActiveXObject("Microsoft.XMLHTTP")
            }catch(e){}
            return null
        };
        
    "undefined"!=typeof y&&b.load(function(){
        g=!0
        });
    b.defer=function(c){
        if(!b.ua.webkit||"undefined"!=typeof importScripts)return c();
        b.load(function(){
            setTimeout(c,100)
            })
        };
        
    b.merge=function(c,e,f,d){
        var d=d||[],f="undefined"==typeof f?2:f,g;
        for(g in e)e.hasOwnProperty(g)&&0>b.indexOf(d,g)&&("object"!==typeof c[g]||!f?(c[g]=e[g],d.push(e[g])):b.merge(c[g],e[g],f-1,d));return c
        };
        
    b.mixin=
    function(c,e){
        b.merge(c.prototype,e.prototype)
        };
        
    b.inherit=function(b,c){
        function e(){}
        e.prototype=c.prototype;
        b.prototype=new e
        };
        
    b.isArray=Array.isArray||function(b){
        return"[object Array]"===Object.prototype.toString.call(b)
        };
        
    b.intersect=function(c,e){
        for(var f=[],d=c.length>e.length?c:e,g=c.length>e.length?e:c,i=0,G=g.length;i<G;i++)~b.indexOf(d,g[i])&&f.push(g[i]);
        return f
        };
        
    b.indexOf=function(b,c,e){
        if(Array.prototype.indexOf)return Array.prototype.indexOf.call(b,c,e);
        for(var f=b.length,e=0>e?0>
            e+f?0:e+f:e||0;e<f&&b[e]!==c;e++);
        return f<=e?-1:e
        };
        
    b.toArray=function(b){
        for(var c=[],e=0,f=b.length;e<f;e++)c.push(b[e]);
        return c
        };
        
    b.ua={};
    
    b.ua.hasCORS="undefined"!=typeof XMLHttpRequest&&function(){
        try{
            var b=new XMLHttpRequest
            }catch(c){
            return!1
            }
            return void 0!=b.withCredentials
        }();
    b.ua.webkit="undefined"!=typeof navigator&&/webkit/i.test(navigator.userAgent)
    }("undefined"!=typeof io?io:module.exports,this),function(d,c){
    function b(){}
    d.EventEmitter=b;
    b.prototype.on=function(b,f){
        this.$events||(this.$events=

        {});
        this.$events[b]?c.util.isArray(this.$events[b])?this.$events[b].push(f):this.$events[b]=[this.$events[b],f]:this.$events[b]=f;
        return this
        };
        
    b.prototype.addListener=b.prototype.on;
    b.prototype.once=function(b,c){
        function d(){
            h.removeListener(b,d);
            c.apply(this,arguments)
            }
            var h=this;
        d.listener=c;
        this.on(b,d);
        return this
        };
        
    b.prototype.removeListener=function(b,f){
        if(this.$events&&this.$events[b]){
            var d=this.$events[b];
            if(c.util.isArray(d)){
                for(var h=-1,j=0,l=d.length;j<l;j++)if(d[j]===f||d[j].listener&&
                    d[j].listener===f){
                    h=j;
                    break
                }
                if(0>h)return this;
                d.splice(h,1);
                d.length||delete this.$events[b]
            }else(d===f||d.listener&&d.listener===f)&&delete this.$events[b]
        }
        return this
        };
        
    b.prototype.removeAllListeners=function(b){
        this.$events&&this.$events[b]&&(this.$events[b]=null);
        return this
        };
        
    b.prototype.listeners=function(b){
        this.$events||(this.$events={});
        this.$events[b]||(this.$events[b]=[]);
        c.util.isArray(this.$events[b])||(this.$events[b]=[this.$events[b]]);
        return this.$events[b]
        };
        
    b.prototype.emit=function(b){
        if(!this.$events)return!1;
        var f=this.$events[b];
        if(!f)return!1;
        var d=Array.prototype.slice.call(arguments,1);
        if("function"==typeof f)f.apply(this,d);
        else if(c.util.isArray(f))for(var f=f.slice(),h=0,j=f.length;h<j;h++)f[h].apply(this,d);else return!1;
        return!0
        }
    }("undefined"!=typeof io?io:module.exports,"undefined"!=typeof io?io:module.parent.exports),function(d,c){
    function b(b){
        return 10>b?"0"+b:b
        }
        function e(b){
        j.lastIndex=0;
        return j.test(b)?'"'+b.replace(j,function(b){
            var c=q[b];
            return"string"===typeof c?c:"\\u"+("0000"+b.charCodeAt(0).toString(16)).slice(-4)
            })+
        '"':'"'+b+'"'
        }
        function f(c,d){
        var g,h,j,q,L=l,M,m=d[c];
        m instanceof Date&&(m=isFinite(c.valueOf())?c.getUTCFullYear()+"-"+b(c.getUTCMonth()+1)+"-"+b(c.getUTCDate())+"T"+b(c.getUTCHours())+":"+b(c.getUTCMinutes())+":"+b(c.getUTCSeconds())+"Z":null);
        "function"===typeof A&&(m=A.call(d,c,m));
        switch(typeof m){
            case "string":
                return e(m);
            case "number":
                return isFinite(m)?""+m:"null";
            case "boolean":case "null":
                return""+m;
            case "object":
                if(!m)return"null";
                l+=i;
                M=[];
                if("[object Array]"===Object.prototype.toString.apply(m)){
                q=
                m.length;
                for(g=0;g<q;g+=1)M[g]=f(g,m)||"null";
                j=0===M.length?"[]":l?"[\n"+l+M.join(",\n"+l)+"\n"+L+"]":"["+M.join(",")+"]";
                l=L;
                return j
                }
                if(A&&"object"===typeof A){
                q=A.length;
                for(g=0;g<q;g+=1)"string"===typeof A[g]&&(h=A[g],(j=f(h,m))&&M.push(e(h)+(l?": ":":")+j))
                    }else for(h in m)Object.prototype.hasOwnProperty.call(m,h)&&(j=f(h,m))&&M.push(e(h)+(l?": ":":")+j);j=0===M.length?"{}":l?"{\n"+l+M.join(",\n"+l)+"\n"+L+"}":"{"+M.join(",")+"}";
                l=L;
                return j
                }
            }
    if(c&&c.parse)return d.JSON={
    parse:c.parse,
    stringify:c.stringify
    };
var g=d.JSON={},h=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,j=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,l,i,q={
    "\u0008":"\\b",
    "\t":"\\t",
    "\n":"\\n",
    "\u000c":"\\f",
    "\r":"\\r",
    '"':'\\"',
    "\\":"\\\\"
},A;
g.stringify=function(b,c,e){
    var d;
    i=l="";
    if("number"===typeof e)for(d=0;d<e;d+=1)i+=" ";else"string"===typeof e&&(i=e);
    if((A=c)&&"function"!==typeof c&&("object"!==
        typeof c||"number"!==typeof c.length))throw Error("JSON.stringify");
    return f("",{
        "":b
    })
    };
    
g.parse=function(b,c){
    function e(b,f){
        var d,g,h=b[f];
        if(h&&"object"===typeof h)for(d in h)Object.prototype.hasOwnProperty.call(h,d)&&(g=e(h,d),void 0!==g?h[d]=g:delete h[d]);return c.call(b,f,h)
        }
        var f,b=""+b;
    h.lastIndex=0;
    h.test(b)&&(b=b.replace(h,function(b){
        return"\\u"+("0000"+b.charCodeAt(0).toString(16)).slice(-4)
        }));
    if(/^[\],:{}\s]*$/.test(b.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
        "]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return f=eval("("+b+")"),"function"===typeof c?e({
        "":f
    },""):f;
    throw new SyntaxError("JSON.parse");
}
}("undefined"!=typeof io?io:module.exports,"undefined"!==typeof JSON?JSON:void 0),function(d,c){
    var b=d.parser={},e=b.packets="disconnect,connect,heartbeat,message,json,event,ack,error,noop".split(","),f=b.reasons=["transport not supported","client not handshaken","unauthorized"],g=b.advice=["reconnect"],h=c.JSON,j=c.util.indexOf;
    b.encodePacket=function(b){
        var c=
        j(e,b.type),d=b.id||"",l=b.endpoint||"",s=b.ack,i=null;
        switch(b.type){
            case "error":
                var H=b.reason?j(f,b.reason):"",b=b.advice?j(g,b.advice):"";
                if(""!==H||""!==b)i=H+(""!==b?"+"+b:"");
                break;
            case "message":
                ""!==b.data&&(i=b.data);
                break;
            case "event":
                i={
                name:b.name
                };
                
            b.args&&b.args.length&&(i.args=b.args);
                i=h.stringify(i);
                break;
            case "json":
                i=h.stringify(b.data);
                break;
            case "connect":
                b.qs&&(i=b.qs);
                break;
            case "ack":
                i=b.ackId+(b.args&&b.args.length?"+"+h.stringify(b.args):"")
                }
                c=[c,d+("data"==s?"+":""),l];
        null!==i&&void 0!==i&&c.push(i);
        return c.join(":")
        };
        
    b.encodePayload=function(b){
        var c="";
        if(1==b.length)return b[0];
        for(var e=0,f=b.length;e<f;e++)c+="\ufffd"+b[e].length+"\ufffd"+b[e];
        return c
        };
        
    var l=/([^:]+):([0-9]+)?(\+)?:([^:]+)?:?([\s\S]*)?/;
    b.decodePacket=function(b){
        var c=b.match(l);
        if(!c)return{};
            
        var d=c[2]||"",b=c[5]||"",j={
            type:e[c[1]],
            endpoint:c[4]||""
            };
            
        d&&(j.id=d,j.ack=c[3]?"data":!0);
        switch(j.type){
            case "error":
                c=b.split("+");
                j.reason=f[c[0]]||"";
                j.advice=g[c[1]]||"";
                break;
            case "message":
                j.data=
                b||"";
                break;
            case "event":
                try{
                var s=h.parse(b);
                j.name=s.name;
                j.args=s.args
                }catch(i){}
                j.args=j.args||[];
                break;
            case "json":
                try{
                j.data=h.parse(b)
                }catch(H){}
                break;
            case "connect":
                j.qs=b||"";
                break;
            case "ack":
                if(c=b.match(/^([0-9]+)(\+)?(.*)/))if(j.ackId=c[1],j.args=[],c[3])try{
                j.args=c[3]?h.parse(c[3]):[]
                }catch(B){}
                }
                return j
    };
    
b.decodePayload=function(c){
    if("\ufffd"==c.charAt(0)){
        for(var e=[],f=1,d="";f<c.length;f++)"\ufffd"==c.charAt(f)?(e.push(b.decodePacket(c.substr(f+1).substr(0,d))),f+=Number(d)+1,d=
            ""):d+=c.charAt(f);
        return e
        }
        return[b.decodePacket(c)]
    }
}("undefined"!=typeof io?io:module.exports,"undefined"!=typeof io?io:module.parent.exports),function(d,c){
    function b(b,c){
        this.socket=b;
        this.sessid=c
        }
        d.Transport=b;
    c.util.mixin(b,c.EventEmitter);
    b.prototype.onData=function(b){
        this.clearCloseTimeout();
        (this.connected||this.connecting||this.reconnecting)&&this.setCloseTimeout();
        if(""!==b&&(b=c.parser.decodePayload(b))&&b.length)for(var f=0,d=b.length;f<d;f++)this.onPacket(b[f]);
        return this
        };
        
    b.prototype.onPacket=
    function(b){
        if("heartbeat"==b.type)return this.onHeartbeat();
        if("connect"==b.type&&""==b.endpoint)this.onConnect();
        this.socket.onPacket(b);
        return this
        };
        
    b.prototype.setCloseTimeout=function(){
        if(!this.closeTimeout){
            var b=this;
            this.closeTimeout=setTimeout(function(){
                b.onDisconnect()
                },this.socket.closeTimeout)
            }
        };
    
b.prototype.onDisconnect=function(){
    this.close&&this.open&&this.close();
    this.clearTimeouts();
    this.socket.onDisconnect();
    return this
    };
    
b.prototype.onConnect=function(){
    this.socket.onConnect();
    return this
    };
    
b.prototype.clearCloseTimeout=function(){
    this.closeTimeout&&(clearTimeout(this.closeTimeout),this.closeTimeout=null)
    };
    
b.prototype.clearTimeouts=function(){
    this.clearCloseTimeout();
    this.reopenTimeout&&clearTimeout(this.reopenTimeout)
    };
    
b.prototype.packet=function(b){
    this.send(c.parser.encodePacket(b))
    };
    
b.prototype.onHeartbeat=function(){
    this.socket.resetHeartbeat();
    this.packet({
        type:"heartbeat"
    })
    };
    
b.prototype.onOpen=function(){
    this.open=!0;
    this.clearCloseTimeout();
    this.socket.onOpen()
    };
b.prototype.onClose=function(){
    this.open=!1;
    this.socket.onClose();
    this.onDisconnect()
    };
    
b.prototype.prepareUrl=function(){
    var b=this.socket.options;
    return this.scheme()+"://"+b.host+":"+b.port+"/"+b.resource+"/"+c.protocol+"/"+this.name+"/"+this.sessid
    };
    
b.prototype.ready=function(b,c){
    c.call(this)
    }
}("undefined"!=typeof io?io:module.exports,"undefined"!=typeof io?io:module.parent.exports),function(d,c,b){
    function e(e){
        this.options={
            port:80,
            secure:!1,
            document:"document"in b?document:!1,
            resource:"socket.io",
            transports:c.transports,
            "connect timeout":1E4,
            "try multiple transports":!0,
            reconnect:!0,
            "reconnection delay":100,
            "max reconnection delay":Infinity,
            "reconnection limit":Infinity,
            "reopen delay":3E3,
            "max reconnection attempts":10,
            "sync disconnect on unload":!0,
            "auto connect":!0,
            "flash policy port":10843
        };
        
        c.util.merge(this.options,e);
        this.options.transports=e.transports;
        this.reconnecting=this.connecting=this.open=this.connected=!1;
        this.namespaces={};
        
        this.buffer=[];
        this.doBuffer=!1;
        if(this.options["sync disconnect on unload"]&&
            (!this.isXDomain()||c.util.ua.hasCORS)){
            var f=this;
            c.util.on(b,"beforeunload",function(){
                f.disconnectSync()
                },!1)
            }
            this.options["auto connect"]&&this.connect()
        }
        function f(){}
    d.Socket=e;
    c.util.mixin(e,c.EventEmitter);
    e.prototype.of=function(b){
        this.namespaces[b]||(this.namespaces[b]=new c.SocketNamespace(this,b),""!==b&&this.namespaces[b].packet({
            type:"connect"
        }));
        return this.namespaces[b]
        };
        
    e.prototype.publish=function(){
        this.emit.apply(this,arguments);
        var b,c;
        for(c in this.namespaces)this.namespaces.hasOwnProperty(c)&&
            (b=this.of(c),b.$emit.apply(b,arguments))
            };
            
    e.prototype.handshake=function(b){
        function e(c){
            if(c instanceof Error)d.onError(c.message);else b.apply(null,c.split(":"))
                }
                var d=this,l=this.options,l=["http"+(l.secure?"s":"")+":/",l.host+":"+l.port,l.resource,c.protocol,c.util.query(this.options.query,"t="+ +new Date)].join("/");
        if(this.isXDomain()&&!c.util.ua.hasCORS){
            var i=document.getElementsByTagName("script")[0],q=document.createElement("script");
            q.src=l+"&jsonp="+c.j.length;
            i.parentNode.insertBefore(q,
                i);
            c.j.push(function(b){
                e(b);
                q.parentNode.removeChild(q)
                })
            }else{
            var A=c.util.request();
            d.ajaxWait=!0;
            A.open("GET",l,!0);
            A.onreadystatechange=function(){
                4==A.readyState&&(A.onreadystatechange=f,d.ajaxWait=!1,200==A.status?e(A.responseText):!d.reconnecting&&d.onError(A.responseText))
                };
                
            A.send(null)
            }
        };
    
e.prototype.getTransport=function(b){
    for(var b=b||this.transports,e=0,f;f=b[e];e++)if(c.Transport[f]&&c.Transport[f].check(this)&&(!this.isXDomain()||c.Transport[f].xdomainCheck()))return new c.Transport[f](this,
        this.sessionid);return null
    };
    
e.prototype.connect=function(b){
    if(this.connecting||this.ajaxWait)return this;
    var e=this;
    this.resetHeartbeat=function(){
        clearTimeout(e.timeoutHeartbeat);
        e.timeoutHeartbeat=setTimeout(function(){
            e.connected&&e.disconnect()
            },1.5*e.heartbeatInterval)
        };
        
    this.handshake(function(f,d,i,q){
        function A(b){
            e.transport&&e.transport.clearTimeouts();
            e.transport=e.getTransport(b);
            if(!e.transport)return e.publish("connect_failed");
            e.transport.ready(e,function(){
                e.connecting=!0;
                e.publish("connecting",
                    e.transport.name);
                e.transport.open();
                e.options["connect timeout"]&&(e.connectTimeoutTimer=setTimeout(function(){
                    if(!e.connected&&(e.connecting=!1,e.options["try multiple transports"])){
                        e.remainingTransports||(e.remainingTransports=e.transports.slice(0));
                        for(var b=e.remainingTransports;0<b.length&&b.splice(0,1)[0]!=e.transport.name;);
                        b.length?A(b):e.publish("connect_failed")
                        }
                    },e.options["connect timeout"]))
            })
        }
        e.sessionid=f;
    e.closeTimeout=1E3*i;
    e.heartbeatInterval=1E3*d;
    e.transports=c.util.intersect(q.split(","),
        e.options.transports);
    A();
        e.once("connect",function(){
        clearTimeout(e.connectTimeoutTimer);
        b&&"function"==typeof b&&b()
        })
    });
return this
};

e.prototype.packet=function(b){
    this.connected&&!this.doBuffer?this.transport.packet(b):this.buffer.push(b);
    return this
    };
    
e.prototype.setBuffer=function(b){
    this.doBuffer=b;
    !b&&this.connected&&this.buffer.length&&(this.transport.payload(this.buffer),this.buffer=[])
    };
    
e.prototype.disconnect=function(){
    this.connected&&(this.open&&this.of("").packet({
        type:"disconnect"
    }),
    this.onDisconnect("booted"));
    return this
    };
    
e.prototype.disconnectSync=function(){
    c.util.request().open("GET",this.resource+"/"+c.protocol+"/"+this.sessionid,!0);
    this.onDisconnect("booted")
    };
    
e.prototype.isXDomain=function(){
    var c=b.location.port||("https:"==b.location.protocol?443:80);
    return this.options.host!==b.location.hostname||this.options.port!=c
    };
    
e.prototype.onConnect=function(){
    this.connected||(this.connected=!0,this.connecting=!1,this.resetHeartbeat(),this.doBuffer||this.setBuffer(!1),this.emit("connect"))
    };
e.prototype.onOpen=function(){
    this.open=!0
    };
    
e.prototype.onClose=function(){
    this.open=!1
    };
    
e.prototype.onPacket=function(b){
    this.of(b.endpoint).onPacket(b)
    };
    
e.prototype.onError=function(b){
    b&&b.advice&&"reconnect"===b.advice&&this.connected&&(this.disconnect(),this.reconnect());
    this.publish("error",b&&b.reason?b.reason:b)
    };
    
e.prototype.onDisconnect=function(b){
    var c=this.connected;
    this.open=this.ajaxWait=this.connecting=this.connected=!1;
    c&&(this.transport.close(),this.transport.clearTimeouts(),this.publish("disconnect",
        b),"booted"!=b&&this.options.reconnect&&!this.reconnecting&&this.reconnect())
    };
    
e.prototype.reconnect=function(){
    function b(){
        if(e.connected){
            for(var f in e.namespaces)e.namespaces.hasOwnProperty(f)&&""!==f&&e.namespaces[f].packet({
                type:"connect"
            });e.publish("reconnect",e.transport.name,e.reconnectionAttempts)
            }
            e.removeListener("connect_failed",c);
        e.removeListener("connect",c);
        e.reconnecting=!1;
        delete e.reconnectionAttempts;
        delete e.reconnectionDelay;
        delete e.reconnectionTimer;
        delete e.redoTransports;
        e.options["try multiple transports"]=d
        }
        function c(){
        if(e.reconnecting){
            if(e.connected)return b();
            if((e.connecting||e.ajaxWait)&&e.reconnecting)return e.reconnectionTimer=setTimeout(c,1E3);
            e.reconnectionAttempts++>=f?e.redoTransports?(e.publish("reconnect_failed"),b()):(e.on("connect_failed",c),e.options["try multiple transports"]=!0,e.transport=e.getTransport(),e.redoTransports=!0,e.connect()):(e.reconnectionDelay<i&&(e.reconnectionDelay=Math.min(2*e.reconnectionDelay,e.options["max reconnection delay"])),
                e.connect(),e.publish("reconnecting",e.reconnectionDelay,e.reconnectionAttempts),e.reconnectionTimer=setTimeout(c,e.reconnectionDelay))
            }
        }
    this.reconnecting=!0;
this.reconnectionAttempts=0;
this.reconnectionDelay=this.options["reconnection delay"];
var e=this,f=this.options["max reconnection attempts"],d=this.options["try multiple transports"],i=this.options["reconnection limit"];
this.options["try multiple transports"]=!1;
this.reconnectionTimer=setTimeout(c,this.reconnectionDelay);
this.on("connect",c)
}
}("undefined"!=
    typeof io?io:module.exports,"undefined"!=typeof io?io:module.parent.exports,this),function(d,c){
    function b(b,c){
        this.socket=b;
        this.name=c||"";
        this.flags={};
        
        this.json=new e(this,"json");
        this.ackPackets=0;
        this.acks={}
    }
    function e(b,c){
    this.namespace=b;
    this.name=c
    }
    d.SocketNamespace=b;
c.util.mixin(b,c.EventEmitter);
b.prototype.$emit=c.EventEmitter.prototype.emit;
b.prototype.of=function(){
    return this.socket.of.apply(this.socket,arguments)
    };
    
b.prototype.packet=function(b){
    b.endpoint=this.name;
    this.socket.packet(b);
    this.flags={};
    
    return this
    };
    
b.prototype.send=function(b,c){
    var e={
        type:this.flags.json?"json":"message",
        data:b
    };
    
    "function"==typeof c&&(e.id=++this.ackPackets,e.ack=!0,this.acks[e.id]=c);
    return this.packet(e)
    };
    
b.prototype.emit=function(b){
    var c=Array.prototype.slice.call(arguments,1),e=c[c.length-1],d={
        type:"event",
        name:b
    };
    
    "function"==typeof e&&(d.id=++this.ackPackets,d.ack="data",this.acks[d.id]=e,c=c.slice(0,c.length-1));
    d.args=c;
    return this.packet(d)
    };
    
b.prototype.disconnect=function(){
    ""===this.name?
    this.socket.disconnect():(this.packet({
        type:"disconnect"
    }),this.$emit("disconnect"));
    return this
    };
    
b.prototype.onPacket=function(b){
    function e(){
        d.packet({
            type:"ack",
            args:c.util.toArray(arguments),
            ackId:b.id
            })
        }
        var d=this;
    switch(b.type){
        case "connect":
            this.$emit("connect");
            break;
        case "disconnect":
            if(""===this.name)this.socket.onDisconnect(b.reason||"booted");else this.$emit("disconnect",b.reason);
            break;
        case "message":case "json":
            var j=["message",b.data];
            "data"==b.ack?j.push(e):b.ack&&this.packet({
            type:"ack",
            ackId:b.id
            });
        this.$emit.apply(this,j);
            break;
        case "event":
            j=[b.name].concat(b.args);
            "data"==b.ack&&j.push(e);
            this.$emit.apply(this,j);
            break;
        case "ack":
            this.acks[b.ackId]&&(this.acks[b.ackId].apply(this,b.args),delete this.acks[b.ackId]);
            break;
        case "error":
            if(b.advice)this.socket.onError(b);else"unauthorized"==b.reason?this.$emit("connect_failed",b.reason):this.$emit("error",b.reason)
            }
        };

e.prototype.send=function(){
    this.namespace.flags[this.name]=!0;
    this.namespace.send.apply(this.namespace,arguments)
    };
e.prototype.emit=function(){
    this.namespace.flags[this.name]=!0;
    this.namespace.emit.apply(this.namespace,arguments)
    }
}("undefined"!=typeof io?io:module.exports,"undefined"!=typeof io?io:module.parent.exports),function(d,c,b){
    function e(b){
        c.Transport.apply(this,arguments)
        }
        d.websocket=e;
    c.util.inherit(e,c.Transport);
    e.prototype.name="websocket";
    e.prototype.open=function(){
        var e=c.util.query(this.socket.options.query),d=this,h;
        h||(h=b.MozWebSocket||b.WebSocket);
        this.websocket=new h(this.prepareUrl()+
            e);
        this.websocket.onopen=function(){
            d.onOpen();
            d.socket.setBuffer(!1)
            };
            
        this.websocket.onmessage=function(b){
            d.onData(b.data)
            };
            
        this.websocket.onclose=function(){
            d.onClose();
            d.socket.setBuffer(!0)
            };
            
        this.websocket.onerror=function(b){
            d.onError(b)
            };
            
        return this
        };
        
    e.prototype.send=function(b){
        try{
            this.websocket.send(b)
            }catch(c){
            console.error(c),this.onDisconnect()
            }
            return this
        };
        
    e.prototype.payload=function(b){
        for(var c=0,e=b.length;c<e;c++)this.packet(b[c]);
        return this
        };
        
    e.prototype.close=function(){
        try{
            this.websocket.close()
            }catch(b){
            console.error(b)
            }
            return this
        };
    e.prototype.onError=function(b){
        this.socket.onError(b)
        };
        
    e.prototype.scheme=function(){
        return this.socket.options.secure?"wss":"ws"
        };
        
    e.check=function(){
        return"WebSocket"in b&&!("__addTask"in WebSocket)||"MozWebSocket"in b
        };
        
    e.xdomainCheck=function(){
        return!0
        };
        
    c.transports.push("websocket")
    }("undefined"!=typeof io?io.Transport:module.exports,"undefined"!=typeof io?io:module.parent.exports,this));
C("underscore")&&function(){
    function d(b,c,e){
        if(b===c)return 0!==b||1/b==1/c;
        if(null==b||null==c)return b===
            c;
        b._chain&&(b=b._wrapped);
        c._chain&&(c=c._wrapped);
        if(b.isEqual&&w.isFunction(b.isEqual))return b.isEqual(c);
        if(c.isEqual&&w.isFunction(c.isEqual))return c.isEqual(b);
        var f=l.call(b);
        if(f!=l.call(c))return!1;
        switch(f){
            case "[object String]":
                return b==""+c;
            case "[object Number]":
                return b!=+b?c!=+c:0==b?1/b==1/c:b==+c;
            case "[object Date]":case "[object Boolean]":
                return+b==+c;
            case "[object RegExp]":
                return b.source==c.source&&b.global==c.global&&b.multiline==c.multiline&&b.ignoreCase==c.ignoreCase
                }
                if("object"!=
            typeof b||"object"!=typeof c)return!1;
        for(var g=e.length;g--;)if(e[g]==b)return!0;e.push(b);
        var g=0,h=!0;
        if("[object Array]"==f){
            if(g=b.length,h=g==c.length)for(;g--&&(h=g in b==g in c&&d(b[g],c[g],e)););
        }else{
            if("constructor"in b!="constructor"in c||b.constructor!=c.constructor)return!1;
            for(var j in b)if(w.has(b,j)&&(g++,!(h=w.has(c,j)&&d(b[j],c[j],e))))break;if(h){
                for(j in c)if(w.has(c,j)&&!g--)break;h=!g
                }
            }
        e.pop();
    return h
    }
    var c=this,b=c._,e={},f=Array.prototype,g=Object.prototype,h=f.slice,j=f.unshift,
l=g.toString,i=g.hasOwnProperty,q=f.forEach,A=f.map,G=f.reduce,s=f.reduceRight,x=f.filter,H=f.every,B=f.some,I=f.indexOf,L=f.lastIndexOf,g=Array.isArray,M=Object.keys,m=Function.prototype.bind,w=function(b){
    return new F(b)
    };
    
"undefined"!==typeof exports?("undefined"!==typeof module&&module.exports&&(exports=module.exports=w),exports._=w):c._=w;
w.VERSION="1.3.3";
var n=w.each=w.forEach=function(b,c,f){
    if(null!=b)if(q&&b.forEach===q)b.forEach(c,f);
        else if(b.length===+b.length)for(var d=0,g=b.length;d<
        g&&!(d in b&&c.call(f,b[d],d,b)===e);d++);else for(d in b)if(w.has(b,d)&&c.call(f,b[d],d,b)===e)break
        };
        
w.map=w.collect=function(b,c,e){
    var f=[];
    if(null==b)return f;
    if(A&&b.map===A)return b.map(c,e);
    n(b,function(b,d,g){
        f[f.length]=c.call(e,b,d,g)
        });
    b.length===+b.length&&(f.length=b.length);
    return f
    };
    
w.reduce=w.foldl=w.inject=function(b,c,e,f){
    var d=2<arguments.length;
    null==b&&(b=[]);
    if(G&&b.reduce===G)return f&&(c=w.bind(c,f)),d?b.reduce(c,e):b.reduce(c);
    n(b,function(b,g,h){
        d?e=c.call(f,e,b,g,h):(e=
            b,d=!0)
        });
    if(!d)throw new TypeError("Reduce of empty array with no initial value");
    return e
    };
    
w.reduceRight=w.foldr=function(b,c,e,f){
    var d=2<arguments.length;
    null==b&&(b=[]);
    if(s&&b.reduceRight===s)return f&&(c=w.bind(c,f)),d?b.reduceRight(c,e):b.reduceRight(c);
    var g=w.toArray(b).reverse();
    f&&!d&&(c=w.bind(c,f));
    return d?w.reduce(g,c,e,f):w.reduce(g,c)
    };
    
w.find=w.detect=function(b,c,e){
    var f;
    t(b,function(b,d,g){
        if(c.call(e,b,d,g))return f=b,!0
            });
    return f
    };
    
w.filter=w.select=function(b,c,e){
    var f=[];
    if(null==b)return f;
    if(x&&b.filter===x)return b.filter(c,e);
    n(b,function(b,d,g){
        c.call(e,b,d,g)&&(f[f.length]=b)
        });
    return f
    };
    
w.reject=function(b,c,e){
    var f=[];
    if(null==b)return f;
    n(b,function(b,d,g){
        c.call(e,b,d,g)||(f[f.length]=b)
        });
    return f
    };
    
w.every=w.all=function(b,c,f){
    var d=!0;
    if(null==b)return d;
    if(H&&b.every===H)return b.every(c,f);
    n(b,function(b,g,h){
        if(!(d=d&&c.call(f,b,g,h)))return e
            });
    return!!d
    };
    
var t=w.some=w.any=function(b,c,f){
    c||(c=w.identity);
    var d=!1;
    if(null==b)return d;
    if(B&&b.some===
        B)return b.some(c,f);
    n(b,function(b,g,h){
        if(d||(d=c.call(f,b,g,h)))return e
            });
    return!!d
    };
    
w.include=w.contains=function(b,c){
    var e=!1;
    if(null==b)return e;
    return I&&b.indexOf===I?-1!=b.indexOf(c):e=t(b,function(b){
        return b===c
        })
    };
    
w.invoke=function(b,c){
    var e=h.call(arguments,2);
    return w.map(b,function(b){
        return(w.isFunction(c)?c||b:b[c]).apply(b,e)
        })
    };
    
w.pluck=function(b,c){
    return w.map(b,function(b){
        return b[c]
        })
    };
    
w.max=function(b,c,e){
    if(!c&&w.isArray(b)&&b[0]===+b[0])return Math.max.apply(Math,b);
    if(!c&&w.isEmpty(b))return-Infinity;
    var f={
        computed:-Infinity
        };
        
    n(b,function(b,d,g){
        d=c?c.call(e,b,d,g):b;
        d>=f.computed&&(f={
            value:b,
            computed:d
        })
        });
    return f.value
    };
    
w.min=function(b,c,e){
    if(!c&&w.isArray(b)&&b[0]===+b[0])return Math.min.apply(Math,b);
    if(!c&&w.isEmpty(b))return Infinity;
    var f={
        computed:Infinity
    };
    
    n(b,function(b,d,g){
        d=c?c.call(e,b,d,g):b;
        d<f.computed&&(f={
            value:b,
            computed:d
        })
        });
    return f.value
    };
    
w.shuffle=function(b){
    var c=[],e;
    n(b,function(b,f){
        e=Math.floor(Math.random()*(f+1));
        c[f]=c[e];
        c[e]=b
        });
    return c
    };
    
w.sortBy=function(b,c,e){
    var f=w.isFunction(c)?c:function(b){
        return b[c]
        };
        
    return w.pluck(w.map(b,function(b,c,d){
        return{
            value:b,
            criteria:f.call(e,b,c,d)
            }
        }).sort(function(b,c){
        var e=b.criteria,f=c.criteria;
        return void 0===e?1:void 0===f?-1:e<f?-1:e>f?1:0
        }),"value")
};

w.groupBy=function(b,c){
    var e={},f=w.isFunction(c)?c:function(b){
        return b[c]
        };
        
    n(b,function(b,c){
        var d=f(b,c);
        (e[d]||(e[d]=[])).push(b)
        });
    return e
    };
    
w.sortedIndex=function(b,c,e){
    e||(e=w.identity);
    for(var f=0,d=b.length;f<
        d;){
        var g=f+d>>1;
        e(b[g])<e(c)?f=g+1:d=g
        }
        return f
    };
    
w.toArray=function(b){
    return!b?[]:w.isArray(b)||w.isArguments(b)?h.call(b):b.toArray&&w.isFunction(b.toArray)?b.toArray():w.values(b)
    };
    
w.size=function(b){
    return w.isArray(b)?b.length:w.keys(b).length
    };
    
w.first=w.head=w.take=function(b,c,e){
    return null!=c&&!e?h.call(b,0,c):b[0]
    };
    
w.initial=function(b,c,e){
    return h.call(b,0,b.length-(null==c||e?1:c))
    };
    
w.last=function(b,c,e){
    return null!=c&&!e?h.call(b,Math.max(b.length-c,0)):b[b.length-1]
    };
    
w.rest=w.tail=
function(b,c,e){
    return h.call(b,null==c||e?1:c)
    };
    
w.compact=function(b){
    return w.filter(b,function(b){
        return!!b
        })
    };
    
w.flatten=function(b,c){
    return w.reduce(b,function(b,e){
        if(w.isArray(e))return b.concat(c?e:w.flatten(e));
        b[b.length]=e;
        return b
        },[])
    };
    
w.without=function(b){
    return w.difference(b,h.call(arguments,1))
    };
    
w.uniq=w.unique=function(b,c,e){
    var e=e?w.map(b,e):b,f=[];
    3>b.length&&(c=!0);
    w.reduce(e,function(e,d,g){
        if(c?w.last(e)!==d||!e.length:!w.include(e,d))e.push(d),f.push(b[g]);
        return e
        },[]);
    return f
    };
    
w.union=function(){
    return w.uniq(w.flatten(arguments,!0))
    };
    
w.intersection=w.intersect=function(b){
    var c=h.call(arguments,1);
    return w.filter(w.uniq(b),function(b){
        return w.every(c,function(c){
            return 0<=w.indexOf(c,b)
            })
        })
    };
    
w.difference=function(b){
    var c=w.flatten(h.call(arguments,1),!0);
    return w.filter(b,function(b){
        return!w.include(c,b)
        })
    };
    
w.zip=function(){
    for(var b=h.call(arguments),c=w.max(w.pluck(b,"length")),e=Array(c),f=0;f<c;f++)e[f]=w.pluck(b,""+f);
    return e
    };
    
w.indexOf=function(b,c,
    e){
    if(null==b)return-1;
    var f;
    if(e)return e=w.sortedIndex(b,c),b[e]===c?e:-1;
    if(I&&b.indexOf===I)return b.indexOf(c);
    for(e=0,f=b.length;e<f;e++)if(e in b&&b[e]===c)return e;return-1
    };
    
w.lastIndexOf=function(b,c){
    if(null==b)return-1;
    if(L&&b.lastIndexOf===L)return b.lastIndexOf(c);
    for(var e=b.length;e--;)if(e in b&&b[e]===c)return e;return-1
    };
    
w.range=function(b,c,e){
    1>=arguments.length&&(c=b||0,b=0);
    for(var e=arguments[2]||1,f=Math.max(Math.ceil((c-b)/e),0),d=0,g=Array(f);d<f;)g[d++]=b,b+=e;
    return g
    };
var v=function(){};

w.bind=function(b,c){
    var e,f;
    if(b.bind===m&&m)return m.apply(b,h.call(arguments,1));
    if(!w.isFunction(b))throw new TypeError;
    f=h.call(arguments,2);
    return e=function(){
        if(!(this instanceof e))return b.apply(c,f.concat(h.call(arguments)));
        v.prototype=b.prototype;
        var d=new v,g=b.apply(d,f.concat(h.call(arguments)));
        return Object(g)===g?g:d
        }
    };

w.bindAll=function(b){
    var c=h.call(arguments,1);
    0==c.length&&(c=w.functions(b));
    n(c,function(c){
        b[c]=w.bind(b[c],b)
        });
    return b
    };
    
w.memoize=function(b,
    c){
    var e={};
    
    c||(c=w.identity);
    return function(){
        var f=c.apply(this,arguments);
        return w.has(e,f)?e[f]:e[f]=b.apply(this,arguments)
        }
    };

w.delay=function(b,c){
    var e=h.call(arguments,2);
    return setTimeout(function(){
        return b.apply(null,e)
        },c)
    };
    
w.defer=function(b){
    return w.delay.apply(w,[b,1].concat(h.call(arguments,1)))
    };
    
w.throttle=function(b,c){
    var e,f,d,g,h,j,s=w.debounce(function(){
        h=g=!1
        },c);
    return function(){
        e=this;
        f=arguments;
        d||(d=setTimeout(function(){
            d=null;
            h&&b.apply(e,f);
            s()
            },c));
        g?h=!0:j=b.apply(e,
            f);
        s();
        g=!0;
        return j
        }
    };

w.debounce=function(b,c,e){
    var f;
    return function(){
        var d=this,g=arguments;
        e&&!f&&b.apply(d,g);
        clearTimeout(f);
        f=setTimeout(function(){
            f=null;
            e||b.apply(d,g)
            },c)
        }
    };

w.once=function(b){
    var c=!1,e;
    return function(){
        if(c)return e;
        c=!0;
        return e=b.apply(this,arguments)
        }
    };

w.wrap=function(b,c){
    return function(){
        var e=[b].concat(h.call(arguments,0));
        return c.apply(this,e)
        }
    };

w.compose=function(){
    var b=arguments;
    return function(){
        for(var c=arguments,e=b.length-1;0<=e;e--)c=[b[e].apply(this,
            c)];
        return c[0]
        }
    };

w.after=function(b,c){
    return 0>=b?c():function(){
        if(1>--b)return c.apply(this,arguments)
            }
        };

w.keys=M||function(b){
    if(b!==Object(b))throw new TypeError("Invalid object");
    var c=[],e;
    for(e in b)w.has(b,e)&&(c[c.length]=e);return c
    };
    
w.values=function(b){
    return w.map(b,w.identity)
    };
    
w.functions=w.methods=function(b){
    var c=[],e;
    for(e in b)w.isFunction(b[e])&&c.push(e);return c.sort()
    };
    
w.extend=function(b){
    n(h.call(arguments,1),function(c){
        for(var e in c)b[e]=c[e]
            });
    return b
    };
    
w.pick=function(b){
    var c=

    {};
    
    n(w.flatten(h.call(arguments,1)),function(e){
        e in b&&(c[e]=b[e])
        });
    return c
    };
    
w.defaults=function(b){
    n(h.call(arguments,1),function(c){
        for(var e in c)null==b[e]&&(b[e]=c[e])
            });
    return b
    };
    
w.clone=function(b){
    return!w.isObject(b)?b:w.isArray(b)?b.slice():w.extend({},b)
    };
    
w.tap=function(b,c){
    c(b);
    return b
    };
    
w.isEqual=function(b,c){
    return d(b,c,[])
    };
    
w.isEmpty=function(b){
    if(null==b)return!0;
    if(w.isArray(b)||w.isString(b))return 0===b.length;
    for(var c in b)if(w.has(b,c))return!1;return!0
    };
    
w.isElement=function(b){
    return!!(b&&
        1==b.nodeType)
    };
    
w.isArray=g||function(b){
    return"[object Array]"==l.call(b)
    };
    
w.isObject=function(b){
    return b===Object(b)
    };
    
w.isArguments=function(b){
    return"[object Arguments]"==l.call(b)
    };
    
w.isArguments(arguments)||(w.isArguments=function(b){
    return!(!b||!w.has(b,"callee"))
    });
w.isFunction=function(b){
    return"[object Function]"==l.call(b)
    };
    
w.isString=function(b){
    return"[object String]"==l.call(b)
    };
    
w.isNumber=function(b){
    return"[object Number]"==l.call(b)
    };
    
w.isFinite=function(b){
    return w.isNumber(b)&&isFinite(b)
    };
w.isNaN=function(b){
    return b!==b
    };
    
w.isBoolean=function(b){
    return!0===b||!1===b||"[object Boolean]"==l.call(b)
    };
    
w.isDate=function(b){
    return"[object Date]"==l.call(b)
    };
    
w.isRegExp=function(b){
    return"[object RegExp]"==l.call(b)
    };
    
w.isNull=function(b){
    return null===b
    };
    
w.isUndefined=function(b){
    return void 0===b
    };
    
w.has=function(b,c){
    return i.call(b,c)
    };
    
w.noConflict=function(){
    c._=b;
    return this
    };
    
w.identity=function(b){
    return b
    };
    
w.times=function(b,c,e){
    for(var f=0;f<b;f++)c.call(e,f)
        };
        
w.escape=function(b){
    return(""+
        b).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/\//g,"&#x2F;")
    };
    
w.result=function(b,c){
    if(null==b)return null;
    var e=b[c];
    return w.isFunction(e)?e.call(b):e
    };
    
w.mixin=function(b){
    n(w.functions(b),function(c){
        N(c,w[c]=b[c])
        })
    };
    
var u=0;
w.uniqueId=function(b){
    var c=u++;
    return b?b+c:c
    };
    
w.templateSettings={
    evaluate:/<%([\s\S]+?)%>/g,
    interpolate:/<%=([\s\S]+?)%>/g,
    escape:/<%-([\s\S]+?)%>/g
};

var z=/.^/,y={
    "\\":"\\",
    "'":"'",
    r:"\r",
    n:"\n",
    t:"\t",
    u2028:"\u2028",
    u2029:"\u2029"
},C;
for(C in y)y[y[C]]=C;var k=/\\|'|\r|\n|\t|\u2028|\u2029/g,D=/\\(\\|'|r|n|t|u2028|u2029)/g,E=function(b){
    return b.replace(D,function(b,c){
        return y[c]
        })
    };
    
w.template=function(b,c,e){
    e=w.defaults(e||{},w.templateSettings);
    b="__p+='"+b.replace(k,function(b){
        return"\\"+y[b]
        }).replace(e.escape||z,function(b,c){
        return"'+\n_.escape("+E(c)+")+\n'"
        }).replace(e.interpolate||z,function(b,c){
        return"'+\n("+E(c)+")+\n'"
        }).replace(e.evaluate||z,function(b,c){
        return"';\n"+E(c)+
        "\n;__p+='"
        })+"';\n";
    e.variable||(b="with(obj||{}){\n"+b+"}\n");
    var b="var __p='';var print=function(){__p+=Array.prototype.join.call(arguments, '')};\n"+b+"return __p;\n",f=new Function(e.variable||"obj","_",b);
    if(c)return f(c,w);
    c=function(b){
        return f.call(this,b,w)
        };
        
    c.source="function("+(e.variable||"obj")+"){\n"+b+"}";
    return c
    };
    
w.chain=function(b){
    return w(b).chain()
    };
    
var F=function(b){
    this._wrapped=b
    };
    
w.prototype=F.prototype;
var J=function(b,c){
    return c?w(b).chain():b
    },N=function(b,c){
    F.prototype[b]=
    function(){
        var b=h.call(arguments);
        j.call(b,this._wrapped);
        return J(c.apply(w,b),this._chain)
        }
    };

w.mixin(w);
n("pop,push,reverse,shift,sort,splice,unshift".split(","),function(b){
    var c=f[b];
    F.prototype[b]=function(){
        var e=this._wrapped;
        c.apply(e,arguments);
        var f=e.length;
        ("shift"==b||"splice"==b)&&0===f&&delete e[0];
        return J(e,this._chain)
        }
    });
n(["concat","join","slice"],function(b){
    var c=f[b];
    F.prototype[b]=function(){
        return J(c.apply(this._wrapped,arguments),this._chain)
        }
    });
F.prototype.chain=function(){
    this._chain=
    !0;
    return this
    };
    
F.prototype.value=function(){
    return this._wrapped
    }
}.call(this);
C("backbone")&&function(){
    var d;
    d="undefined"!==typeof exports?exports:this.Backbone={};
    
    d.VERSION="0.3.3";
    var c=this._;
    !c&&"undefined"!==typeof require&&(c=require("underscore")._);
    var b=this.jQuery||this.Zepto;
    d.emulateHTTP=!1;
    d.emulateJSON=!1;
    d.Events={
        bind:function(b,e){
            this._callbacks||(this._callbacks={});
            var f=this._callbacks[b]||(this._callbacks[b]=[]);
            c.include(f,e)&&console.log(["Bound more than once to",b]);
            f.push(e);
            return this
            },
        unbind:function(b,c){
            var e;
            if(b){
                if(e=this._callbacks)if(c){
                    e=e[b];
                    if(!e)return this;
                    for(var f=0,d=e.length;f<d;f++)if(c===e[f]){
                        e.splice(f,1);
                        break
                    }
                    }else e[b]=[]
                    }else this._callbacks={};
            
        return this
        },
    trigger:function(b){
        var c,e,f,d;
        if(!(e=this._callbacks))return this;
        if(c=e[b])for(f=0,d=c.length;f<d;f++)c[f].apply(this,Array.prototype.slice.call(arguments,1));
        if(c=e.all)for(f=0,d=c.length;f<d;f++)c[f].apply(this,arguments);
        return this
        }
    };

d.Model=function(b,e){
    b||(b={});
    this.defaults&&
    (b=c.extend({},this.defaults,b));
    this.attributes={};
    
    this._escapedAttributes={};
    
    this.cid=c.uniqueId("c");
    this.set(b,{
        silent:!0
        });
    this._previousAttributes=c.clone(this.attributes);
    e&&e.collection&&(this.collection=e.collection);
    this.initialize(b,e)
    };
    
c.extend(d.Model.prototype,d.Events,{
    _previousAttributes:null,
    _changed:!1,
    initialize:function(){},
    toJSON:function(){
        return c.clone(this.attributes)
        },
    get:function(b){
        return this.attributes[b]
        },
    escape:function(b){
        var c;
        if(c=this._escapedAttributes[b])return c;
        c=this.attributes[b];
        return this._escapedAttributes[b]=(null==c?"":c).replace(/&(?!\w+;)/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")
        },
    set:function(b,e){
        e||(e={});
        if(!b)return this;
        b.attributes&&(b=b.attributes);
        "_id"in b&&(b.id=b._id);
        var f=this.attributes,d=this._escapedAttributes;
        if(!e.silent&&this.validate&&!this._performValidation(b,e))return!1;
        "id"in b&&(this.id=b.id);
        for(var g in b){
            var h=b[g];
            c.isEqual(f[g],h)||(f[g]=h,delete d[g],e.silent||(this._changed=!0,
                this.trigger("change:"+g,this,h,e)))
            }!e.silent&&this._changed&&this.change(e);
        return this
        },
    unset:function(b,c){
        c||(c={});
        var e={};
        
        e[b]=void 0;
        if(!c.silent&&this.validate&&!this._performValidation(e,c))return!1;
        delete this.attributes[b];
        delete this._escapedAttributes[b];
        c.silent||(this._changed=!0,this.trigger("change:"+b,this,void 0,c),this.change(c));
        return this
        },
    clear:function(b){
        b||(b={});
        var c=this.attributes,e={};
        
        for(attr in c)e[attr]=void 0;if(!b.silent&&this.validate&&!this._performValidation(e,
            b))return!1;
        this.attributes={};
        
        this._escapedAttributes={};
        
        if(!b.silent){
            this._changed=!0;
            for(attr in c)this.trigger("change:"+attr,this,void 0,b);this.change(b)
            }
            return this
        },
    fetch:function(b){
        b||(b={});
        var c=this,e=G(b.error,c,b);
        (this.sync||d.sync)("read",this,function(e){
            if(!c.set(c.parse(e),b))return!1;
            b.success&&b.success(c,e)
            },e);
        return this
        },
    save:function(b,c){
        c||(c={});
        if(b&&!this.set(b,c))return!1;
        var e=this,f=G(c.error,e,c),g=this.isNew()?"create":"update";
        (this.sync||d.sync)(g,this,function(b){
            if(!e.set(e.parse(b),
                c))return!1;
            c.success&&c.success(e,b)
            },f);
        return this
        },
    destroy:function(b){
        b||(b={});
        var c=this,e=G(b.error,c,b);
        (this.sync||d.sync)("delete",this,function(e){
            c.collection&&c.collection.remove(c);
            b.success&&b.success(c,e)
            },e);
        return this
        },
    url:function(){
        var b=A(this.collection);
        return this.isNew()?b:b+("/"==b.charAt(b.length-1)?"":"/")+this.id
        },
    parse:function(b){
        return b
        },
    clone:function(){
        return new this.constructor(this)
        },
    isNew:function(){
        return!this.id
        },
    change:function(b){
        this.trigger("change",
            this,b);
        this._previousAttributes=c.clone(this.attributes);
        this._changed=!1
        },
    hasChanged:function(b){
        return b?this._previousAttributes[b]!=this.attributes[b]:this._changed
        },
    changedAttributes:function(b){
        b||(b=this.attributes);
        var e=this._previousAttributes,f=!1,d;
        for(d in b)c.isEqual(e[d],b[d])||(f=f||{},f[d]=b[d]);return f
        },
    previous:function(b){
        return!b||!this._previousAttributes?null:this._previousAttributes[b]
        },
    previousAttributes:function(){
        return c.clone(this._previousAttributes)
        },
    _performValidation:function(b,
        c){
        var e=this.validate(b);
        return e?(c.error?c.error(this,e):this.trigger("error",this,e,c),!1):!0
        }
    });
d.Collection=function(b,e){
    e||(e={});
    e.comparator&&(this.comparator=e.comparator,delete e.comparator);
    this._boundOnModelEvent=c.bind(this._onModelEvent,this);
    this._reset();
    b&&this.refresh(b,{
        silent:!0
        });
    this.initialize(b,e)
    };
    
c.extend(d.Collection.prototype,d.Events,{
    model:d.Model,
    initialize:function(){},
    toJSON:function(){
        return this.map(function(b){
            return b.toJSON()
            })
        },
    add:function(b,e){
        if(c.isArray(b))for(var f=
            0,d=b.length;f<d;f++)this._add(b[f],e);else this._add(b,e);
        return this
        },
    remove:function(b,e){
        if(c.isArray(b))for(var f=0,d=b.length;f<d;f++)this._remove(b[f],e);else this._remove(b,e);
        return this
        },
    get:function(b){
        return null==b?null:this._byId[null!=b.id?b.id:b]
        },
    getByCid:function(b){
        return b&&this._byCid[b.cid||b]
        },
    at:function(b){
        return this.models[b]
        },
    sort:function(b){
        b||(b={});
        if(!this.comparator)throw Error("Cannot sort a set without a comparator");
        this.models=this.sortBy(this.comparator);
        b.silent||
        this.trigger("refresh",this,b);
        return this
        },
    pluck:function(b){
        return c.map(this.models,function(c){
            return c.get(b)
            })
        },
    refresh:function(b,c){
        b||(b=[]);
        c||(c={});
        this._reset();
        this.add(b,{
            silent:!0
            });
        c.silent||this.trigger("refresh",this,c);
        return this
        },
    fetch:function(b){
        b||(b={});
        var c=this,e=G(b.error,c,b);
        (this.sync||d.sync)("read",this,function(e){
            c.refresh(c.parse(e));
            b.success&&b.success(c,e)
            },e);
        return this
        },
    create:function(b,c){
        var e=this;
        c||(c={});
        b instanceof d.Model?b.collection=e:b=new this.model(b,

        {
            collection:e
        });
        return b.save(null,{
            success:function(b,f){
                e.add(b);
                c.success&&c.success(b,f)
                },
            error:c.error
            })
        },
    parse:function(b){
        return b
        },
    chain:function(){
        return c(this.models).chain()
        },
    _reset:function(){
        this.length=0;
        this.models=[];
        this._byId={};
        
        this._byCid={}
    },
_add:function(b,c){
    c||(c={});
    b instanceof d.Model||(b=new this.model(b,{
        collection:this
    }));
    var e=this.getByCid(b);
    if(e)throw Error(["Can't add the same model to a set twice",e.id]);
    this._byId[b.id]=b;
    this._byCid[b.cid]=b;
    b.collection=this;
    this.models.splice(this.comparator?this.sortedIndex(b,this.comparator):this.length,0,b);
    b.unbind("all",this._boundOnModelEvent);
    b.bind("all",this._boundOnModelEvent);
    this.length++;
    c.silent||b.trigger("add",b,this,c);
    return b
    },
_remove:function(b,c){
    c||(c={});
    b=this.getByCid(b)||this.get(b);
    if(!b)return null;
    delete this._byId[b.id];
    delete this._byCid[b.cid];
    delete b.collection;
    this.models.splice(this.indexOf(b),1);
    this.length--;
    c.silent||b.trigger("remove",b,this,c);
    b.unbind("all",this._boundOnModelEvent);
    return b
    },
_onModelEvent:function(b,c){
    "change:id"===b&&(delete this._byId[c.previous("id")],this._byId[c.id]=c);
    this.trigger.apply(this,arguments)
    }
});
c.each("forEach,each,map,reduce,reduceRight,find,detect,filter,select,reject,every,all,some,any,include,invoke,max,min,sortBy,sortedIndex,toArray,size,first,rest,last,without,indexOf,lastIndexOf,isEmpty".split(","),function(b){
    d.Collection.prototype[b]=function(){
        return c[b].apply(c,[this.models].concat(c.toArray(arguments)))
        }
    });
d.Controller=function(b){
    b||
    (b={});
    b.routes&&(this.routes=b.routes);
    this._bindRoutes();
    this.initialize(b)
    };
    
var e=/:([\w\d]+)/g,f=/\*([\w\d]+)/g;
c.extend(d.Controller.prototype,d.Events,{
    initialize:function(){},
    route:function(b,e,f){
        d.history||(d.history=new d.History);
        c.isRegExp(b)||(b=this._routeToRegExp(b));
        d.history.route(b,c.bind(function(c){
            c=this._extractParameters(b,c);
            f.apply(this,c);
            this.trigger.apply(this,["route:"+e].concat(c))
            },this))
        },
    saveLocation:function(b){
        d.history.saveLocation(b)
        },
    _bindRoutes:function(){
        if(this.routes)for(var b in this.routes){
            var c=
            this.routes[b];
            this.route(b,c,this[c])
            }
        },
_routeToRegExp:function(b){
    b=b.replace(e,"([^/]*)").replace(f,"(.*?)");
    return RegExp("^"+b+"$")
    },
_extractParameters:function(b,c){
    return b.exec(c).slice(1)
    }
});
d.History=function(){
    this.handlers=[];
    this.fragment=this.getFragment();
    c.bindAll(this,"checkUrl")
    };
    
var g=/^#*/;
c.extend(d.History.prototype,{
    interval:50,
    getFragment:function(b){
        return(b||y.location).hash.replace(g,"")
        },
    start:function(){
        var c=document.documentMode;
        if(c=b.browser.msie&&(!c||7>=c))this.iframe=
            b('<iframe src="javascript:0" tabindex="-1" />').hide().appendTo("body")[0].contentWindow;
        "onhashchange"in y&&!c?b(y).bind("hashchange",this.checkUrl):setInterval(this.checkUrl,this.interval);
        return this.loadUrl()
        },
    route:function(b,c){
        this.handlers.push({
            route:b,
            callback:c
        })
        },
    checkUrl:function(){
        var b=this.getFragment();
        b==this.fragment&&this.iframe&&(b=this.getFragment(this.iframe.location));
        if(b==this.fragment||b==decodeURIComponent(this.fragment))return!1;
        this.iframe&&(y.location.hash=this.iframe.location.hash=
            b);
        this.loadUrl()
        },
    loadUrl:function(){
        var b=this.fragment=this.getFragment();
        return c.any(this.handlers,function(c){
            if(c.route.test(b))return c.callback(b),!0
                })
        },
    saveLocation:function(b){
        b=(b||"").replace(g,"");
        this.fragment!=b&&(y.location.hash=this.fragment=b,this.iframe&&b!=this.getFragment(this.iframe.location)&&(this.iframe.document.open().close(),this.iframe.location.hash=b))
        }
    });
d.View=function(b){
    this._configure(b||{});
    this._ensureElement();
    this.delegateEvents();
    this.initialize(b)
    };
    
var h=/^(\w+)\s*(.*)$/;
c.extend(d.View.prototype,d.Events,{
    tagName:"div",
    $:function(c){
        return b(c,this.el)
        },
    initialize:function(){},
    render:function(){
        return this
        },
    remove:function(){
        b(this.el).remove();
        return this
        },
    make:function(c,e,f){
        c=document.createElement(c);
        e&&b(c).attr(e);
        f&&b(c).html(f);
        return c
        },
    delegateEvents:function(e){
        if(e||(e=this.events)){
            b(this.el).unbind();
            for(var f in e){
                var d=e[f],g=f.match(h),j=g[1],g=g[2],d=c.bind(this[d],this);
                ""===g?b(this.el).bind(j,d):b(this.el).delegate(g,j,d)
                }
            }
            },
_configure:function(b){
    this.options&&
    (b=c.extend({},this.options,b));
    b.model&&(this.model=b.model);
    b.collection&&(this.collection=b.collection);
    b.el&&(this.el=b.el);
    b.id&&(this.id=b.id);
    b.className&&(this.className=b.className);
    b.tagName&&(this.tagName=b.tagName);
    this.options=b
    },
_ensureElement:function(){
    if(!this.el){
        var b={};
        
        this.id&&(b.id=this.id);
        this.className&&(b["class"]=this.className);
        this.el=this.make(this.tagName,b)
        }
    }
});
var j=function(b,c){
    var e=q(this,b,c);
    e.extend=j;
    return e
    };
    
d.Model.extend=d.Collection.extend=d.Controller.extend=
d.View.extend=j;
var l={
    create:"POST",
    update:"PUT",
    "delete":"DELETE",
    read:"GET"
};

d.sync=function(c,e,f,g){
    var h=l[c],c="create"===c||"update"===c?JSON.stringify(e.toJSON()):null,e={
        url:A(e),
        type:h,
        contentType:"application/json",
        data:c,
        dataType:"json",
        processData:!1,
        success:f,
        error:g
    };
    
    d.emulateJSON&&(e.contentType="application/x-www-form-urlencoded",e.processData=!0,e.data=c?{
        model:c
    }:{});
    if(d.emulateHTTP&&("PUT"===h||"DELETE"===h))d.emulateJSON&&(e.data._method=h),e.type="POST",e.beforeSend=function(b){
        b.setRequestHeader("X-HTTP-Method-Override",
            h)
        };
        
    b.ajax(e)
    };
    
var i=function(){},q=function(b,e,f){
    var d;
    d=e&&e.hasOwnProperty("constructor")?e.constructor:function(){
        return b.apply(this,arguments)
        };
        
    i.prototype=b.prototype;
    d.prototype=new i;
    e&&c.extend(d.prototype,e);
    f&&c.extend(d,f);
    d.prototype.constructor=d;
    d.__super__=b.prototype;
    return d
    },A=function(b){
    if(!b||!b.url)throw Error("A 'url' property or function must be specified");
    return c.isFunction(b.url)?b.url():b.url
    },G=function(b,c,e){
    return function(f){
        b?b(c,f):c.trigger("error",c,f,e)
        }
    }
}();
if(C("mustache"))var Fe=function(){
    var d=function(){};
    
    d.prototype={
        otag:"{{",
        ctag:"}}",
        pragmas:{},
        buffer:[],
        pragmas_implemented:{
            "IMPLICIT-ITERATOR":!0
            },
        context:{},
        render:function(c,b,e,f){
            f||(this.context=b,this.buffer=[]);
            if(this.includes("",c)){
                c=this.render_pragmas(c);
                c=this.render_section(c,b,e);
                if(f)return this.render_tags(c,b,e,f);
                this.render_tags(c,b,e,f)
                }else{
                if(f)return c;
                this.send(c)
                }
            },
    send:function(c){
        ""!=c&&this.buffer.push(c)
        },
    render_pragmas:function(c){
        if(!this.includes("%",c))return c;
        var b=this;
        return c.replace(RegExp(this.otag+"%([\\w-]+) ?([\\w]+=[\\w]+)?"+this.ctag),function(c,f,d){
            if(!b.pragmas_implemented[f])throw{
                message:"This implementation of mustache doesn't understand the '"+f+"' pragma"
                };
                
            b.pragmas[f]={};
            
            d&&(c=d.split("="),b.pragmas[f][c[0]]=c[1]);
            return""
            })
        },
    render_partial:function(c,b,e){
        c=this.trim(c);
        if(!e||void 0===e[c])throw{
            message:"unknown_partial '"+c+"'"
            };
            
        return"object"!=typeof b[c]?this.render(e[c],b,e,!0):this.render(e[c],b[c],e,!0)
        },
    render_section:function(c,
        b,e){
        if(!this.includes("#",c)&&!this.includes("^",c))return c;
        var f=this;
        return c.replace(RegExp(this.otag+"(\\^|\\#)\\s*(.+?)\\s*"+this.ctag+"\n*([\\s\\S]+?)"+this.otag+"\\/\\s*\\2\\s*"+this.ctag+"\\s*","mg"),function(c,d,j,l){
            c=f.find(j,b);
            if("^"==d)return!c||f.is_array(c)&&0===c.length?f.render(l,b,e,!0):"";
            if("#"==d)return f.is_array(c)?f.map(c,function(b){
                return f.render(l,f.create_context(b),e,!0)
                }).join(""):f.is_object(c)?f.render(l,f.create_context(c),e,!0):"function"===typeof c?c.call(b,
                l,function(c){
                    return f.render(c,b,e,!0)
                    }):c?f.render(l,b,e,!0):""
                })
        },
    render_tags:function(c,b,e,f){
        for(var d=this,h=function(){
            return RegExp(d.otag+"(=|!|>|\\{|%)?([^\\/#\\^]+?)\\1?"+d.ctag+"+","g")
            },j=h(),l=function(c,f,l){
            switch(f){
                case "!":
                    return"";
                case "=":
                    return d.set_delimiters(l),j=h(),"";
                case ">":
                    return d.render_partial(l,b,e);
                case "{":
                    return d.find(l,b);
                default:
                    return d.escape(d.find(l,b))
                    }
                },c=c.split("\n"),i=0;i<c.length;i++)c[i]=c[i].replace(j,l,this),f||this.send(c[i]);
    if(f)return c.join("\n")
        },
set_delimiters:function(c){
    c=c.split(" ");
    this.otag=this.escape_regex(c[0]);
    this.ctag=this.escape_regex(c[1])
    },
escape_regex:function(c){
    arguments.callee.sRE||(arguments.callee.sRE=RegExp("(\\/|\\.|\\*|\\+|\\?|\\||\\(|\\)|\\[|\\]|\\{|\\}|\\\\)","g"));
    return c.replace(arguments.callee.sRE,"\\$1")
    },
find:function(c,b){
    var c=this.trim(c),e;
    !1===b[c]||0===b[c]||b[c]?e=b[c]:(!1===this.context[c]||0===this.context[c]||this.context[c])&&(e=this.context[c]);
    return"function"===typeof e?e.apply(b):void 0!==e?
    e:""
    },
includes:function(c,b){
    return-1!=b.indexOf(this.otag+c)
    },
escape:function(c){
    return(""+(null===c?"":c)).replace(/&(?!\w+;)?|["'<>\\]/g,function(b){
        switch(b){
            case "&":
                return"&amp;";
            case "\\":
                return"&#92;";
            case '"':
                return"&quot;";
            case "'":
                return"&#39;";
            case "<":
                return"&lt;";
            case ">":
                return"&gt;";
            default:
                return b
                }
            })
},
create_context:function(c){
    if(this.is_object(c))return c;
    var b=".";
    this.pragmas["IMPLICIT-ITERATOR"]&&(b=this.pragmas["IMPLICIT-ITERATOR"].iterator);
    var e={};
    
    e[b]=c;
    return e
    },
is_object:function(c){
    return c&&
    "object"==typeof c
    },
is_array:function(c){
    return"[object Array]"===Object.prototype.toString.call(c)
    },
trim:function(c){
    return c.replace(/^\s*|\s*$/g,"")
    },
map:function(c,b){
    if("function"==typeof c.map)return c.map(b);
    for(var e=[],f=c.length,d=0;d<f;d++)e.push(b(c[d]));
    return e
    }
};

return{
    name:"mustache.js",
    version:"0.3.1-dev",
    to_html:function(c,b,e,f){
        var g=new d;
        f&&(g.send=f);
        g.render(c,b,e);
        if(!f)return g.buffer.join("\n")
            }
        }
}();
if(C("markdown")){
    var Hb;
    "undefined"===typeof exports?(y.markdown={},Hb=
        y.markdown):Hb=exports;
    (function(d){
        function c(b){
            for(var c=0,e=-1;-1!=(e=b.indexOf("\n",e+1));)c++;
            return c
            }
            function b(b,c){
            function e(b){
                this.len_after=b;
                this.name="close_"+c
                }
                var f=b+"_state",d="strong"==b?"em_state":"strong_state";
            return function(g){
                if(this[f][0]==c)return this[f].shift(),[g.length,new e(g.length-c.length)];
                var h=this[d].slice(),j=this[f].slice();
                this[f].unshift(c);
                var l=this.processInline(g.substr(c.length)),i=l[l.length-1];
                this[f].shift();
                if(i instanceof e)return l.pop(),[g.length-
                    i.len_after,[b].concat(l)];
                this[d]=h;
                this[f]=j;
                return[c.length,c]
                }
            }
        function e(b){
        return A(b)&&1<b.length&&"object"===typeof b[1]&&!A(b[1])?b[1]:void 0
        }
        function f(b){
        for(var c=b.split(""),b=[""],e=!1;c.length;){
            var f=c.shift();
            switch(f){
                case " ":
                    e?b[b.length-1]+=f:b.push("");
                    break;
                case "'":case '"':
                    e=!e;
                    break;
                case "\\":
                    f=c.shift();
                default:
                    b[b.length-1]+=f
                    }
                }
        c={};
    
    for(e=0;e<b.length;++e)/^#/.test(b[e])?c.id=b[e].substring(1):/^\./.test(b[e])?c["class"]=c["class"]?c["class"]+b[e].replace(/./," "):b[e].substring(1):
        /=/.test(b[e])&&(f=b[e].split(/=/),c[f[0]]=f[1]);
        return c
        }
        function g(b){
        return b.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")
        }
        function h(b){
        if("string"===typeof b)return g(b);
        var c=b.shift(),e={},f=[];
        for(b.length&&"object"===typeof b[0]&&!(b[0]instanceof Array)&&(e=b.shift());b.length;)f.push(arguments.callee(b.shift()));
        var d="",h;
        for(h in e)d+=" "+h+'="'+g(e[h])+'"';return"br"==c?"<"+c+d+" />":"<"+c+d+">"+f.join("")+"</"+c+">"
        }
        function j(b,
        c,f){
        var f=f||{},d=b.slice(0);
        "function"===typeof f.preprocessTreeNode&&(d=f.preprocessTreeNode(d,c));
        var g=e(d);
        if(g){
            d[1]={};
            
            for(var h in g)d[1][h]=g[h];g=d[1]
            }
            if("string"===typeof d)return d;
        switch(d[0]){
            case "header":
                d[0]="h"+d[1].level;
                delete d[1].level;
                break;
            case "bulletlist":
                d[0]="ul";
                break;
            case "numberlist":
                d[0]="ol";
                break;
            case "listitem":
                d[0]="li";
                break;
            case "para":
                d[0]="p";
                break;
            case "markdown":
                d[0]="html";
                g&&delete g.references;
                break;
            case "code_block":
                d[0]="pre";
                h=g?2:1;
                var j=["code"];
                j.push.apply(j,d.splice(h));
                d[h]=j;
                break;
            case "inlinecode":
                d[0]="code";
                break;
            case "img":
                d[1].src=d[1].href;
                delete d[1].href;
                break;
            case "linebreak":
                d[0]="br";
                break;
            case "link":
                d[0]="a";
                break;
            case "link_ref":
                if(d[0]="a",h=c[g.ref])delete g.ref,g.href=h.href,h.title&&(g.title=h.title),delete g.original;else return g.original
                }
                h=1;
        if(g){
            for(var l in d[1])h=2;1===h&&d.splice(h,1)
            }
            for(;h<d.length;++h)d[h]=arguments.callee(d[h],c,f);
        return d
        }
        function l(b){
        for(var c=e(b)?2:1;c<b.length;)"string"===typeof b[c]?
            c+1<b.length&&"string"===typeof b[c+1]?b[c]+=b.splice(c+1,1)[0]:++c:(arguments.callee(b[c]),++c)
            }
            var i=d.Markdown=function s(b){
        switch(typeof b){
            case "undefined":
                this.dialect=s.dialects.Gruber;
                break;
            case "object":
                this.dialect=b;
                break;
            default:
                if(b in s.dialects)this.dialect=s.dialects[b];else throw Error("Unknown Markdown dialect '"+b+"'");
                }
                this.em_state=[];
        this.strong_state=[];
        this.debug_indent=""
        };
        
    d.parse=function(b,c){
        return(new i(c)).toTree(b)
        };
        
    d.toHTML=function(b,c,e){
        b=d.toHTMLTree(b,c,e);
        return d.renderJsonML(b)
        };
    d.toHTMLTree=function(b,c,f){
        "string"===typeof b&&(b=this.parse(b,c));
        var c=e(b),d={};
        
        c&&c.references&&(d=c.references);
        b=j(b,d,f);
        l(b);
        return b
        };
        
    var q=i.mk_block=function(b,c,e){
        1==arguments.length&&(c="\n\n");
        var f=new String(b);
        f.trailing=c;
        f.toSource=function(){
            return"Markdown.mk_block( "+uneval(b)+", "+uneval(c)+", "+uneval(e)+" )"
            };
            
        void 0!=e&&(f.lineNumber=e);
        return f
        };
        
    i.prototype.split_blocks=function(b){
        var e=/([\s\S]+?)($|\n(?:\s*\n|$)+)/g,f=[],d,g=1;
        if(null!=(d=/^(\s*\n)/.exec(b)))g+=c(d[0]),
            e.lastIndex=d[0].length;
        for(;null!=(d=e.exec(b));)f.push(q(d[1],d[2],g)),g+=c(d[0]);
        return f
        };
        
    i.prototype.processBlock=function(b,c){
        var e=this.dialect.block,f=e.__order__;
        if("__call__"in e)return e.__call__.call(this,b,c);
        for(var d=0;d<f.length;d++){
            var g=e[f[d]].call(this,b,c);
            if(g)return(!A(g)||0<g.length&&!A(g[0]))&&this.debug(f[d],"didn't return a proper array"),g
                }
                return[]
        };
        
    i.prototype.processInline=function(b){
        return this.dialect.inline.__call__.call(this,""+b)
        };
        
    i.prototype.toTree=function(b,
        c){
        var e=b instanceof Array?b:this.split_blocks(b),f=this.tree;
        try{
            this.tree=c||this.tree||["markdown"];
                a:for(;e.length;){
                var d=this.processBlock(e.shift(),e);
                if(!d.length)continue a;
                this.tree.push.apply(this.tree,d)
                }
                return this.tree
            }finally{
            c&&(this.tree=f)
            }
        };
    
    i.prototype.debug=function(){
        var b=Array.prototype.slice.call(arguments);
        b.unshift(this.debug_indent);
        "undefined"!==typeof print&&print.apply(print,b);
        "undefined"!==typeof console&&"undefined"!==typeof console.log&&console.log.apply(null,b)
        };
    i.prototype.loop_re_over_block=function(b,c,e){
        for(var f,c=c.valueOf();c.length&&null!=(f=b.exec(c));)c=c.substr(f[0].length),e.call(this,f);
        return c
        };
        
    i.dialects={};
    
    i.dialects.Gruber={
        block:{
            atxHeader:function(b,c){
                var e=b.match(/^(#{1,6})\s*(.*?)\s*#*\s*(?:\n|$)/);
                if(e){
                    var f=["header",{
                        level:e[1].length
                        }];
                    Array.prototype.push.apply(f,this.processInline(e[2]));
                    e[0].length<b.length&&c.unshift(q(b.substr(e[0].length),b.trailing,b.lineNumber+2));
                    return[f]
                    }
                },
        setextHeader:function(b,c){
            var e=b.match(/^(.*)\n([-=])\2\2+(?:\n|$)/);
            if(e){
                var f=["header",{
                    level:"="===e[2]?1:2
                    },e[1]];
                e[0].length<b.length&&c.unshift(q(b.substr(e[0].length),b.trailing,b.lineNumber+2));
                return[f]
                }
            },
    code:function(b,c){
        var e=[],f=/^(?: {0,3}\t| {4})(.*)\n?/,d=b.match(f);
        if(d){
            a:do if(d=this.loop_re_over_block(f,b.valueOf(),function(b){
                e.push(b[1])
                }),d.length){
                c.unshift(q(d,b.trailing));
                break a
            }else if(c.length){
                d=c[0].match(f);
                if(!d)break a;
                e.push(b.trailing.replace(/[^\n]/g,"").substring(2));
                b=c.shift()
                }else break a;while(1);
        return[["code_block",e.join("\n")]]
            }
        },
horizRule:function(b,c){
    var e=b.match(/^(?:([\s\S]*?)\n)?[ \t]*([-_*])(?:[ \t]*\2){2,}[ \t]*(?:\n([\s\S]*))?$/);
    if(e){
        var f=[["hr"]];
        e[1]&&f.unshift.apply(f,this.processBlock(e[1],[]));
        e[3]&&c.unshift(q(e[3]));
        return f
        }
    },
lists:function(){
    function b(c,e,f,d){
        if(e)c.push(["para"].concat(f));
        else{
            e=c[c.length-1]instanceof Array&&"para"==c[c.length-1][0]?c[c.length-1]:c;
            d&&1<c.length&&f.unshift(d);
            for(c=0;c<f.length;c++)d=f[c],"string"==typeof d&&1<e.length&&"string"==typeof e[e.length-1]?e[e.length-
                1]+=d:e.push(d)
                }
            }
    function c(b,e){
    for(var f=RegExp("^("+g+"{"+b+"}.*?\\n?)*$"),d=RegExp("^"+g+"{"+b+"}","gm"),h=[];0<e.length;){
        f.exec(e[0])&&(f=e.shift(),d=f.replace(d,""),h.push(q(d,f.trailing,f.lineNumber)));
        break
    }
    return h
    }
    function e(b,c,f){
    b=b.list;
    b=b[b.length-1];
    b[1]instanceof Array&&"para"==b[1][0]||(c+1==f.length?b.push(["para"].concat(b.splice(1))):(c=b.pop(),b.push(["para"].concat(b.splice(1)),c)))
    }
    var f=/[*+-]/,d=/^( {0,3})([*+-]|\d\.)[ \t]+/,g="(?: {0,3}\\t| {4})";
return function(h,j){
    function l(b){
        var c=
        f.exec(b[2])?["bulletlist"]:["numberlist"];
        o.push({
            list:c,
            indent:b[1]
            });
        return c
        }
        var i=h.match(d);
    if(i){
        var o=[],q=l(i),A,m=!1,n=[o[0].list];
            a:for(;;){
            var t=h.split(/(?=\n)/),k="",v=0;
            for(;v<t.length;v++){
                var u="",z=t[v].replace(/^\n/,function(b){
                    u=b;
                    return""
                    }),i=z.match(RegExp("(?:^("+g+"{0,"+o.length+"} {0,3})([*+-]|\\d\\.)\\s+)|(^"+g+"{0,"+(o.length-1)+"}[ ]{0,4})"));
                if(void 0!==i[1]){
                    k.length&&(b(A,m,this.processInline(k),u),m=!1,k="");
                    i[1]=i[1].replace(/ {0,3}\t/g,"    ");
                    var y=Math.floor(i[1].length/
                        4)+1;
                    y>o.length?(q=l(i),A.push(q),A=q[1]=["listitem"]):(o.some(function(b,c){
                        if(b.indent!=i[1])return!1;
                        q=b.list;
                        o.splice(c+1);
                        return!0
                        })||(y++,y<=o.length?(o.splice(y),q=o[y-1].list):(q=l(i),A.push(q))),A=["listitem"],q.push(A));
                    u=""
                    }
                    z.length>i[0].length&&(k+=u+z.substr(i[0].length))
                }
                k.length&&(b(A,m,this.processInline(k),u),m=!1,k="");
            m=c(o.length,j);
            0<m.length&&(o.forEach(e,this),A.push.apply(A,this.toTree(m,[])));
            m=j[0]&&j[0].valueOf()||"";
            if(m.match(d)||m.match(/^ /)){
                h=j.shift();
                if(m=this.dialect.block.horizRule(h,
                    j)){
                    n.push.apply(n,m);
                    break
                }
                o.forEach(e,this);
                m=!0;
                continue a
            }
            break
        }
        return n
        }
    }
}(),
blockquote:function(b,c){
    if(b.match(/^>/m)){
        var e=[];
        if(">"!=b[0]){
            for(var f=b.split(/\n/),d=[];f.length&&">"!=f[0][0];)d.push(f.shift());
            b=f.join("\n");
            e.push.apply(e,this.processBlock(d.join("\n"),[]))
            }
            for(;c.length&&">"==c[0][0];)f=c.shift(),b+=b.trailing+f,b.trailing=f.trailing;
        f=b.replace(/^> ?/gm,"");
        e.push(this.toTree(f,["blockquote"]));
        return e
        }
    },
referenceDefn:function(b,c){
    var f=/^\s*\[(.*?)\]:\s*(\S+)(?:\s+(?:(['"])(.*?)\3|\((.*?)\)))?\n?/;
    if(b.match(f)){
        e(this.tree)||this.tree.splice(1,0,{});
        var d=e(this.tree);
        void 0===d.references&&(d.references={});
        f=this.loop_re_over_block(f,b,function(b){
            b[2]&&"<"==b[2][0]&&">"==b[2][b[2].length-1]&&(b[2]=b[2].substring(1,b[2].length-1));
            var c=d.references[b[1].toLowerCase()]={
                href:b[2]
                };
                
            void 0!==b[4]?c.title=b[4]:void 0!==b[5]&&(c.title=b[5])
            });
        f.length&&c.unshift(q(f,b.trailing));
        return[]
        }
    },
para:function(b){
    return[["para"].concat(this.processInline(b))]
    }
}
};

i.dialects.Gruber.inline={
    __call__:function(b,
        c){
        function e(b){
            "string"==typeof b&&"string"==typeof f[f.length-1]?f[f.length-1]+=b:f.push(b)
            }
            for(var f=[],d,g=RegExp("([\\s\\S]*?)("+(c.source||c)+")","g"),h=0;null!=(d=g.exec(b));){
            d[1]?e(d[1]):d[1]={
                length:0
            };
            
            var j;
            d[2]in this.dialect.inline&&(j=this.dialect.inline[d[2]].call(this,b.substr(d.index+d[1].length),d,f));
            j=j||[d[2].length,d[2]];
            h=j.shift();
            g.lastIndex+=h-d[2].length;
            j.forEach(e);
            h=g.lastIndex
            }
            b.length>h&&e(b.substr(h));
        return f
        },
    "\\":function(b){
        return b.match(/^\\[\\`\*_{}\[\]()#\+.!\-]/)?
        [2,b[1]]:[1,"\\"]
        },
    "![":function(b){
        var c=b.match(/^!\[(.*?)\][ \t]*\([ \t]*(\S*)(?:[ \t]+(["'])(.*?)\3)?[ \t]*\)/);
        return c?(c[2]&&"<"==c[2][0]&&">"==c[2][c[2].length-1]&&(c[2]=c[2].substring(1,c[2].length-1)),c[2]==this.dialect.inline.__call__.call(this,c[2],/\\/)[0],b={
            alt:c[1],
            href:c[2]||""
            },void 0!==c[4]&&(b.title=c[4]),[c[0].length,["img",b]]):(c=b.match(/^!\[(.*?)\][ \t]*\[(.*?)\]/))?[c[0].length,["img_ref",{
            alt:c[1],
            ref:c[2].toLowerCase(),
            text:c[0]
            }]]:[2,"!["]
        },
    "[":function(b){
        var c=b.match(/^\[([\s\S]*?)\][ \t]*\([ \t]*(\S+)(?:[ \t]+(["'])(.*?)\3)?[ \t]*\)/);
        if(c)return c[2]&&"<"==c[2][0]&&">"==c[2][c[2].length-1]&&(c[2]=c[2].substring(1,c[2].length-1)),c[2]=this.dialect.inline.__call__.call(this,c[2],/\\/)[0],b={
            href:c[2]||""
            },void 0!==c[4]&&(b.title=c[4]),b=["link",b],Array.prototype.push.apply(b,this.processInline(c[1])),[c[0].length,b];
        if(c=b.match(/^\[([\s\S]*?)\](?: ?\[(.*?)\])?/)){
            if(void 0===c[2]||""===c[2])c[2]=c[1];
            b={
                ref:c[2].toLowerCase(),
                original:c[0]
                };
                
            b=["link_ref",b];
            Array.prototype.push.apply(b,this.processInline(c[1]));
            return[c[0].length,
            b]
            }
            return[1,"["]
        },
    "<":function(b){
        var c;
        return null!=(c=b.match(/^<(?:((https?|ftp|mailto):[^>]+)|(.*?@.*?\.[a-zA-Z]+))>/))?c[3]?[c[0].length,["link",{
            href:"mailto:"+c[3]
            },c[3]]]:"mailto"==c[2]?[c[0].length,["link",{
            href:c[1]
            },c[1].substr(7)]]:[c[0].length,["link",{
            href:c[1]
            },c[1]]]:[1,"<"]
        },
    "`":function(b){
        return(b=b.match(/(`+)(([\s\S]*?)\1)/))&&b[2]?[b[1].length+b[2].length,["inlinecode",b[3]]]:[1,"`"]
        },
    "  \n":function(){
        return[3,["linebreak"]]
        }
    };

i.dialects.Gruber.inline["**"]=b("strong","**");
i.dialects.Gruber.inline.__=b("strong","__");
i.dialects.Gruber.inline["*"]=b("em","*");
i.dialects.Gruber.inline._=b("em","_");
i.buildBlockOrder=function(b){
    var c=[],e;
    for(e in b)"__order__"==e||"__call__"==e||c.push(e);b.__order__=c
    };
    
i.buildInlinePatterns=function(b){
    var c=[],e;
    for(e in b)if("__call__"!=e){
        var f=e.replace(/([\\.*+?|()\[\]{}])/g,"\\$1").replace(/\n/,"\\n");
        c.push(1==e.length?f:"(?:"+f+")")
        }
        var c=c.join("|"),d=b.__call__;
    b.__call__=function(b,e){
        return void 0!=e?d.call(this,b,e):d.call(this,
            b,c)
        }
    };

i.subclassDialect=function(b){
    function c(){}
    function e(){}
    c.prototype=b.block;
    e.prototype=b.inline;
    return{
        block:new c,
        inline:new e
        }
    };

i.buildBlockOrder(i.dialects.Gruber.block);
i.buildInlinePatterns(i.dialects.Gruber.inline);
i.dialects.Maruku=i.subclassDialect(i.dialects.Gruber);
i.dialects.Maruku.block.document_meta=function(b){
    if(!(1<b.lineNumber)&&b.match(/^(?:\w+:.*\n)*\w+:.*$/)){
        e(this.tree)||this.tree.splice(1,0,{});
        b=b.split(/\n/);
        for(p in b){
            var c=b[p].match(/(\w+):\s*(.*)$/);
            this.tree[1][c[1].toLowerCase()]=
            c[2]
            }
            return[]
        }
    };

i.dialects.Maruku.block.block_meta=function(b){
    var c=b.match(/(^|\n) {0,3}\{:\s*((?:\\\}|[^\}])*)\s*\}$/);
    if(c){
        var d=f(c[2]);
        if(""===c[1]){
            c=this.tree[this.tree.length-1];
            b=e(c);
            if("string"===typeof c)return;
            b||(b={},c.splice(1,0,b));
            for(a in d)b[a]=d[a];return[]
            }
            c=this.processBlock(b.replace(/\n.*$/,""),[]);
        b=e(c[0]);
        b||(b={},c[0].splice(1,0,b));
        for(a in d)b[a]=d[a];return c
        }
    };

i.dialects.Maruku.block.definition_list=function(b,c){
    var e=/^((?:[^\s:].*\n)+):\s+((?:\s\S)+)$/,f=["dl"];
    if(b.match(e)){
        for(var d=[b];c.length&&e.exec(c[0]);)d.push(c.shift());
        for(var g=0;g<d.length;++g){
            for(var h=d[g].match(e),j=h[1].replace(/\n$/,"").split(/\n/),h=h[2].split(/\n:\s+/),l=0;l<j.length;++l)f.push(["dt",j[l]]);
            for(l=0;l<h.length;++l)f.push(["dd"].concat(this.processInline(h[l].replace(/(\n)\s+/,"$1"))))
                }
                return[f]
        }
    };

i.dialects.Maruku.inline["{:"]=function(b,c,d){
    if(!d.length)return[2,"{:"];
    c=d[d.length-1];
    if("string"===typeof c)return[2,"{:"];
    b=b.match(/^\{:\s*((?:\\\}|[^\}])*)\s*\}/);
    if(!b)return[2,"{:"];
    var d=f(b[1]),g=e(c);
    g||(g={},c.splice(1,0,g));
    for(var h in d)g[h]=d[h];return[b[0].length,""]
    };
    
i.buildBlockOrder(i.dialects.Maruku.block);
i.buildInlinePatterns(i.dialects.Maruku.inline);
var A=d.isArray=function(b){
    return b instanceof Array||"array"===typeof b||Array.isArray(b)
    };
    
d.renderJsonML=function(b,c){
    c=c||{};
    
    c.root=c.root||!1;
    var e=[];
    if(c.root)e.push(h(b));
    else{
        b.shift();
        for(b.length&&"object"===typeof b[0]&&!(b[0]instanceof Array)&&b.shift();b.length;)e.push(h(b.shift()))
            }
            return e.join("\n\n")
    }
})(Hb)
}
C("async")&&
function(){
    var d={},c=this,b=c.async;
    "undefined"!==typeof module&&module.exports?module.exports=d:c.async=d;
    d.noConflict=function(){
        c.async=b;
        return d
        };
        
    var e=function(b,c){
        if(b.forEach)return b.forEach(c);
        for(var e=0;e<b.length;e+=1)c(b[e],e,b)
            },f=function(b,c){
        if(b.map)return b.map(c);
        var f=[];
        e(b,function(b,e,d){
            f.push(c(b,e,d))
            });
        return f
        },g=function(b,c,f){
        if(b.reduce)return b.reduce(c,f);
        e(b,function(b,e,d){
            f=c(f,b,e,d)
            });
        return f
        },h=function(b){
        if(Object.keys)return Object.keys(b);
        var c=[],
        e;
        for(e in b)b.hasOwnProperty(e)&&c.push(e);return c
        };
        
    d.nextTick="undefined"===typeof process||!process.nextTick?function(b){
        setTimeout(b,0)
        }:process.nextTick;
    d.forEach=function(b,c,f){
        if(!b.length)return f();
        var d=0;
        e(b,function(e){
            c(e,function(c){
                c?(f(c),f=function(){}):(d+=1,d===b.length&&f())
                })
            })
        };
        
    d.forEachSeries=function(b,c,e){
        if(!b.length)return e();
        var f=0,d=function(){
            c(b[f],function(c){
                c?(e(c),e=function(){}):(f+=1,f===b.length?e():d())
                })
            };
            
        d()
        };
        
    d.forEachLimit=function(b,c,e,f){
        if(!b.length||
            0>=c)return f();
        var d=0,g=0,h=0;
        (function L(){
            if(d===b.length)return f();
            for(;h<c&&g<b.length;)e(b[g],function(c){
                c?(f(c),f=function(){}):(d+=1,h-=1,d===b.length?f():L())
                }),g+=1,h+=1
            })()
        };
        
    var j=function(b){
        return function(){
            var c=Array.prototype.slice.call(arguments);
            return b.apply(null,[d.forEach].concat(c))
            }
        },l=function(b){
    return function(){
        var c=Array.prototype.slice.call(arguments);
        return b.apply(null,[d.forEachSeries].concat(c))
        }
    },i=function(b,c,e,d){
    var g=[],c=f(c,function(b,c){
        return{
            index:c,
            value:b
        }
    });
b(c,function(b,c){
    e(b.value,function(e,f){
        g[b.index]=f;
        c(e)
        })
    },function(b){
    d(b,g)
    })
};

d.map=j(i);
d.mapSeries=l(i);
d.reduce=function(b,c,e,f){
    d.forEachSeries(b,function(b,f){
        e(c,b,function(b,e){
            c=e;
            f(b)
            })
        },function(b){
        f(b,c)
        })
    };
    
d.inject=d.reduce;
d.foldl=d.reduce;
d.reduceRight=function(b,c,e,g){
    b=f(b,function(b){
        return b
        }).reverse();
    d.reduce(b,c,e,g)
    };
    
d.foldr=d.reduceRight;
i=function(b,c,e,d){
    var g=[],c=f(c,function(b,c){
        return{
            index:c,
            value:b
        }
    });
b(c,function(b,c){
    e(b.value,function(e){
        e&&
        g.push(b);
        c()
        })
    },function(){
    d(f(g.sort(function(b,c){
        return b.index-c.index
        }),function(b){
        return b.value
        }))
    })
};

d.filter=j(i);
d.filterSeries=l(i);
d.select=d.filter;
d.selectSeries=d.filterSeries;
i=function(b,c,e,d){
    var g=[],c=f(c,function(b,c){
        return{
            index:c,
            value:b
        }
    });
b(c,function(b,c){
    e(b.value,function(e){
        e||g.push(b);
        c()
        })
    },function(){
    d(f(g.sort(function(b,c){
        return b.index-c.index
        }),function(b){
        return b.value
        }))
    })
};

d.reject=j(i);
d.rejectSeries=l(i);
i=function(b,c,e,f){
    b(c,function(b,c){
        e(b,function(e){
            e?
            (f(b),f=function(){}):c()
            })
        },function(){
        f()
        })
    };
    
d.detect=j(i);
d.detectSeries=l(i);
d.some=function(b,c,e){
    d.forEach(b,function(b,f){
        c(b,function(b){
            b&&(e(!0),e=function(){});
            f()
            })
        },function(){
        e(!1)
        })
    };
    
d.any=d.some;
d.every=function(b,c,e){
    d.forEach(b,function(b,f){
        c(b,function(b){
            b||(e(!1),e=function(){});
            f()
            })
        },function(){
        e(!0)
        })
    };
    
d.all=d.every;
d.sortBy=function(b,c,e){
    d.map(b,function(b,e){
        c(b,function(c,f){
            c?e(c):e(null,{
                value:b,
                criteria:f
            })
            })
        },function(b,c){
        if(b)return e(b);
        e(null,f(c.sort(function(b,
            c){
            var e=b.criteria,f=c.criteria;
            return e<f?-1:e>f?1:0
            }),function(b){
            return b.value
            }))
        })
    };
    
d.auto=function(b,c){
    var c=c||function(){},f=h(b);
    if(!f.length)return c(null);
    var d={},j=[],l=function(b){
        j.unshift(b)
        },i=function(){
        e(j.slice(0),function(b){
            b()
            })
        };
        
    l(function(){
        h(d).length===f.length&&(c(null,d),c=function(){})
        });
    e(f,function(e){
        var f=b[e]instanceof Function?[b[e]]:b[e],h=function(b){
            if(b)c(b),c=function(){};
            else{
                var f=Array.prototype.slice.call(arguments,1);
                1>=f.length&&(f=f[0]);
                d[e]=f;
                i()
                }
            },
    o=f.slice(0,Math.abs(f.length-1))||[],w=function(){
        return g(o,function(b,c){
            return b&&d.hasOwnProperty(c)
            },!0)
        };
        
    if(w())f[f.length-1](h,d);
        else{
        var m=function(){
            if(w()){
                for(var b=m,c=0;c<j.length;c+=1)if(j[c]===b){
                    j.splice(c,1);
                    break
                }
                f[f.length-1](h,d)
                }
            };
        
    l(m)
        }
    })
};

d.waterfall=function(b,c){
    if(!b.length)return c();
    var c=c||function(){},e=function(b){
        return function(f){
            if(f)c(f),c=function(){};
            else{
                var g=Array.prototype.slice.call(arguments,1),h=b.next();
                h?g.push(e(h)):g.push(c);
                d.nextTick(function(){
                    b.apply(null,
                        g)
                    })
                }
            }
    };

e(d.iterator(b))()
};

d.parallel=function(b,c){
    c=c||function(){};
    
    if(b.constructor===Array)d.map(b,function(b,c){
        b&&b(function(b){
            var e=Array.prototype.slice.call(arguments,1);
            1>=e.length&&(e=e[0]);
            c.call(null,b,e)
            })
        },c);
    else{
        var e={};
        
        d.forEach(h(b),function(c,f){
            b[c](function(b){
                var d=Array.prototype.slice.call(arguments,1);
                1>=d.length&&(d=d[0]);
                e[c]=d;
                f(b)
                })
            },function(b){
            c(b,e)
            })
        }
    };

d.series=function(b,c){
    c=c||function(){};
    
    if(b.constructor===Array)d.mapSeries(b,function(b,c){
        b&&b(function(b){
            var e=
            Array.prototype.slice.call(arguments,1);
            1>=e.length&&(e=e[0]);
            c.call(null,b,e)
            })
        },c);
    else{
        var e={};
        
        d.forEachSeries(h(b),function(c,f){
            b[c](function(b){
                var d=Array.prototype.slice.call(arguments,1);
                1>=d.length&&(d=d[0]);
                e[c]=d;
                f(b)
                })
            },function(b){
            c(b,e)
            })
        }
    };

d.iterator=function(b){
    var c=function(e){
        var f=function(){
            b.length&&b[e].apply(null,arguments);
            return f.next()
            };
            
        f.next=function(){
            return e<b.length-1?c(e+1):null
            };
            
        return f
        };
        
    return c(0)
    };
    
d.apply=function(b){
    var c=Array.prototype.slice.call(arguments,
        1);
    return function(){
        return b.apply(null,c.concat(Array.prototype.slice.call(arguments)))
        }
    };

i=function(b,c,e,f){
    var d=[];
    b(c,function(b,c){
        e(b,function(b,e){
            d=d.concat(e||[]);
            c(b)
            })
        },function(b){
        f(b,d)
        })
    };
    
d.concat=j(i);
d.concatSeries=l(i);
d.whilst=function(b,c,e){
    b()?c(function(f){
        if(f)return e(f);
        d.whilst(b,c,e)
        }):e()
    };
    
d.until=function(b,c,e){
    b()?e():c(function(f){
        if(f)return e(f);
        d.until(b,c,e)
        })
    };
    
d.queue=function(b,c){
    var f=0,g={
        tasks:[],
        concurrency:c,
        saturated:null,
        empty:null,
        drain:null,
        push:function(b,
            f){
            b.constructor!==Array&&(b=[b]);
            e(b,function(b){
                g.tasks.push({
                    data:b,
                    callback:"function"===typeof f?f:null
                    });
                g.saturated&&g.tasks.length==c&&g.saturated();
                d.nextTick(g.process)
                })
            },
        process:function(){
            if(f<g.concurrency&&g.tasks.length){
                var c=g.tasks.shift();
                g.empty&&0==g.tasks.length&&g.empty();
                f+=1;
                b(c.data,function(){
                    f-=1;
                    c.callback&&c.callback.apply(c,arguments);
                    g.drain&&0==g.tasks.length+f&&g.drain();
                    g.process()
                    })
                }
            },
    length:function(){
        return g.tasks.length
        },
    running:function(){
        return f
        }
    };

return g
};
j=function(b){
    return function(c){
        var f=Array.prototype.slice.call(arguments,1);
        c.apply(null,f.concat([function(c){
            var f=Array.prototype.slice.call(arguments,1);
            "undefined"!==typeof console&&(c?console.error&&console.error(c):console[b]&&e(f,function(c){
                console[b](c)
                }))
            }]))
        }
    };

d.log=j("log");
d.dir=j("dir");
d.memoize=function(b,c){
    var e={},f={},c=c||function(b){
        return b
        },d=function(){
        var d=Array.prototype.slice.call(arguments),g=d.pop(),h=c.apply(null,d);
        h in e?g.apply(null,e[h]):h in f?f[h].push(g):
        (f[h]=[g],b.apply(null,d.concat([function(){
            e[h]=arguments;
            var b=f[h];
            delete f[h];
            for(var c=0,d=b.length;c<d;c++)b[c].apply(null,arguments)
                }])))
        };
        
    d.unmemoized=b;
    return d
    };
    
d.unmemoize=function(b){
    return function(){
        return(b.unmemoized||b).apply(null,arguments)
        }
    }
}();
C("dragscrollable")&&function(d){
    d.fn.dragscrollable=function(c){
        var b,e,f,g=d.extend({
            acceptPropagatedEvent:!0,
            preventDefault:!0,
            fxIgnore:function(){
                return!1
                }
            },c||{});
    f=function(c){
        if(!c.data.fxIgnore(c)){
            if(1!=c.which||!c.data.acceptPropagatedEvent&&
                c.target!=this)return!1;
            c.data.lastCoord={
                left:c.clientX,
                top:c.clientY
                };
                
            d.event.add(document,"mouseup",b,c.data);
            d.event.add(document,"mousemove",e,c.data);
            if(c.data.preventDefault)return c.preventDefault(),!1
                }
            };
    
e=function(b){
    var c=b.clientX-b.data.lastCoord.left,e=b.clientY-b.data.lastCoord.top;
    b.data.scrollable.scrollLeft(b.data.scrollable.scrollLeft()-c);
    b.data.scrollable.scrollTop(b.data.scrollable.scrollTop()-e);
    b.data.lastCoord={
        left:b.clientX,
        top:b.clientY
        };
        
    if(b.data.preventDefault)return b.preventDefault(),
        !1
        };
        
b=function(c){
    d.event.remove(document,"mousemove",e);
    d.event.remove(document,"mouseup",b);
    if(c.data.preventDefault)return c.preventDefault(),!1
        };
        
this.each(function(){
    var b={
        scrollable:d(this),
        acceptPropagatedEvent:g.acceptPropagatedEvent,
        preventDefault:g.preventDefault,
        fxIgnore:g.fxIgnore
        };
        
    d(this).bind("mousedown",b,f)
    })
}
}(jQuery);
require=!1;
if(C("mixin")){
    var db,W=[].slice;
    db=function(){
        var d,c,b,e,f,g,h;
        e=2<=arguments.length?W.call(arguments,0,f=arguments.length-1):(f=0,[]);
        d=arguments[f++];
        for(f=0,g=e.length;f<g;f++)for(c in b=e[f],h=b.prototype,h)b=h[c],d.prototype[c]=b;return d
        };
        
    "undefined"!==typeof module&&null!==module&&(module.exports.mixin=db)
    }
    if(C("sharedUtil")){
    require&&(_=require("underscore"));
    var wb,aa=[].indexOf||function(d){
        for(var c=0,b=this.length;c<b;c++)if(c in this&&this[c]===d)return c;return-1
        };
        
    wb={
        lowerCaseFirstChar:function(d){
            return d[0].toLowerCase()+d.substr(1)
            },
        capitalize:function(d){
            return _.isString(d)&&!_.isEmpty(d)?d[0].toUpperCase()+d.substr(1):d
            },
        pluralize:function(d){
            return""+
            d+"s"
            },
        traverse:function(d,c){
            var b,e,f;
            if(_.isEmpty(c)||!d)return d;
            if(_.isArray(c)){
                for(e=0,f=c.length;e<f&&!(b=c[e],d=d[b],!d);e++);
                return d
                }
                return d[c]
            },
        isSimpleObject:function(d){
            return d&&!_.isArray(d)&&!_.isDate(d)&&!d.prototype&&"object"===typeof d
            },
        escapeForRegex:function(d){
            return d.replace(/[-[\]{}()*+?.,\\\/^$|#\s]/g,"\\$&")
            },
        hasProtocol:function(d){
            return/^[a-z]+:/i.test(d)},
        makeSlug:function(d){var c;d&&(c=wb.removeAccents(d.toLowerCase()).replace(/[^a-z0-9]+/ig,"-").replace(/^-|-$/g,
            ""));
    return c||"-"
    },
removeAccents:function(d){
    return d.replace(/[\u00e0\u00e1\u00e2\u00e3\u00e4\u00e5\u0101\u0103\u0105]/g,"a").replace(/\u00e6/g,"ae").replace(/[\u00e7\u0107\u0109\u010b\u010d]/g,"c").replace(/[\u010f\u0111]/g,"d").replace(/[\u00e8\u00e9\u00ea\u00eb\u0113\u0115\u0117\u0119\u011b]/g,"e").replace(/[\u011d\u011f\u0121\u0123]/g,"g").replace(/[\u0125\u0127]/g,"h").replace(/[\u00ec\u00ed\u00ee\u00ef\u0129\u012b\u012d\u012f\u0131]/g,"i").replace(/[\u00f1\u0144\u0146\u0148\u0149\u014b]/g,
        "n").replace(/[\u00f2\u00f3\u00f4\u00f5\u00f6\u014d\u014f\u0151]/g,"o").replace(/\u0153/g,"oe").replace(/[\u015b\u015d\u015f\u0161]/g,"s").replace(/\u00df/g,"ss").replace(/[\u00f9\u00fa\u00fb\u00fc\u0169\u016b\u016d\u016f\u0171\u0173]/g,"u").replace(/[\u00fd\u00ff]/g,"y")
    },
isShortId:function(d){
    return/^[0-9]{1,8}$/.test(d)
    },
parseDate:function(d){
    return Date.parse(d)
    },
compareMemberType:function(d,c,b,e){
    var f;
    null==e&&(e={});
    e=e.mode;
    null==e&&(e="standard");
    switch(e){
        case "members":
            f=[["normal","admin"]];
            break;
        default:
            f=[["org"],["normal"],["admin"]]
            }
            e=function(b){
        var c,e,l,i;
        e=d.getMemberType(b);
        for(c=l=0,i=f.length;l<i;c=++l)if(b=f[c],0<=aa.call(b,e))return c;return-1
        };
        
    c=e(c);
    b=e(b);
    return c>b?1:c<b?-1:0
    },
isValidSearch:function(d){
    return 2<=(null!=d?d.length:void 0)||this.isShortId(d)
    },
regexCardNumber:/\#(\d{1,7})(?=$|\s|[;:,.!?\)\}\]\<\>])/,
regexLink:/\b((?:[\w-]+:\/\/|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]|(\(([^\s()<>]|\([^\s()<>]+\))+\)))*\))+(?:\(([^\s()<>]|(\(([^\s()<>]|\([^\s()<>]+\))+\)))*\)|[^\s`!()\[\]{};:'".,<>?\u00ab\u00bb\u201c\u201d\u2018\u2019]))/gi,
cleanLink:function(d){
    d.match(/^([\w-]+):\/\//)||(d="http://"+d);
    return d
    }
};

"undefined"!==typeof module&&null!==module&&(module.exports=wb)
}
if(C("versions")){
    require&&(_=require("underscore"));
    var Aa;
    Aa={
        parseVersion:function(d){
            var c;
            c=d.split(".");
            if(0<c.length){
                var b,e,f;
                f=[];
                for(b=0,e=c.length;b<e;b++)d=c[b],f.push(parseInt(d,10)||0);
                d=f
                }else d=[0];
            return d
            },
        compareVersions:function(d,c){
            var b,e,f,g,h,j,l;
            b=Math.max(d.length,c.length);
            j=_.zip(d,c);
            for(g=0,h=j.length;g<h;g++){
                l=j[g];
                e=l[0];
                f=l[1];
                null==e&&(e=0);
                null==f&&(f=0);
                if(e>f)return b;
                if(f>e)return-b;
                b--
            }
            return 0
            },
        differInMostMinorOnly:function(d){
            return-2<d&&2>d
            },
        compareStringVersions:function(d,c){
            var b,e,f;
            f=_.map([d,c],Aa.parseVersion);
            b=f[0];
            e=f[1];
            return Aa.compareVersions(b,e)
            }
        };
    
"undefined"!==typeof module&&null!==module&&(module.exports=Aa)
}
if(C("entityListGenerator")){
    require&&(_=require("underscore"),m=require("./sharedUtil.coffee"));
    var Ma,i=function(d,c){
        return function(){
            return d.apply(c,arguments)
            }
        };
    
Ma=function(){
    function d(b){
        null==
        b&&(b={});
        this.orderEntityList=i(this.orderEntityList,this);
        this.attachmentPreviewEntity=i(this.attachmentPreviewEntity,this);
        this.attachmentEntity=i(this.attachmentEntity,this);
        this.labelEntity=i(this.labelEntity,this);
        this.commentEntity=i(this.commentEntity,this);
        this.checkItemEntity=i(this.checkItemEntity,this);
        this.checklistEntity=i(this.checklistEntity,this);
        this.listEntity=i(this.listEntity,this);
        this.organizationEntity=i(this.organizationEntity,this);
        this.boardEntity=i(this.boardEntity,this);
        this.cardEntity=i(this.cardEntity,this);
        this._getNameForBoard=i(this._getNameForBoard,this);
        this.textEntity=i(this.textEntity,this);
        this.memberEntity=i(this.memberEntity,this);
        this.getOrganizationUrl=i(this.getOrganizationUrl,this);
        this.getBoardUrl=i(this.getBoardUrl,this);
        this.getCardUrl=i(this.getCardUrl,this);
        this.makeFullUrl=i(this.makeFullUrl,this);
        this.fullUrls=b.fullUrls;
        this.domain=b.domain
        }
        var c;
    d.prototype.getId=function(b){
        var c;
        return""+(null!=(c=b.id)?c:b._id)
        };
        
    d.prototype.makeFullUrl=
    function(b){
        return this.fullUrls?""+this.domain+"/"+b:"/"+b
        };
        
    c=function(b){
        return null!=b&&b.toJSON?b.toJSON():b
        };
        
    d.prototype.getCardUrl=function(b,e,f){
        b=c(b);
        e=c(e);
        return(f=c(f))?this.makeFullUrl("card/"+f.username+"/"+m.makeSlug(e.name)+"/"+this.getId(b)+"/"+this.getId(e)):e.idShort?this.makeFullUrl("card/"+m.makeSlug(e.name)+"/"+this.getId(b)+"/"+e.idShort):this.makeFullUrl("card/board/"+m.makeSlug(e.name)+"/"+this.getId(b)+"/"+this.getId(e))
        };
        
    d.prototype.getBoardUrl=function(b){
        b=c(b);
        return this.makeFullUrl("board/"+
            m.makeSlug(b.name)+"/"+this.getId(b))
        };
        
    d.prototype.getOrganizationUrl=function(b){
        var c;
        return this.makeFullUrl("org/"+(null!=(c=b.name)?c:this.getId(b)))
        };
        
    d.prototype.getMember=function(){
        throw"not implemented";
    };
    
    d.prototype.getBoard=function(){
        return{}
    };
    
d.prototype.memberEntity=function(b){
    var c,f;
    c=null!=(f=this.getMember(b))?f.toJSON():void 0;
    return!c?{
        type:"member",
        _id:""+this.idAction+"_"+b
        }:{
        type:"member",
        _id:""+this.idAction+"_"+c._id,
        id:this.getId(c),
        avatarHash:c.avatarHash,
        gravatarHash:c.gravatarHash,
        initials:c.initials,
        fullName:c.fullName,
        username:c.username
        }
    };

d.prototype.textEntity=function(b,c,f){
    null==f&&(f=!1);
    b={
        type:"text",
        _id:""+this.idAction+"_"+b,
        text:b
    };
    
    f&&(b.hideIfContext=!0,b.idContext=c);
    return b
    };
    
d.prototype._getNameForBoard=function(b){
    var c,f;
    if(b&&null!=b.id&&null==b.name)return _.extend(b,null!=(c=null!=(f=this.getBoard(b.id))?f.toJSON():void 0)?c:{})
        };
        
d.prototype.cardEntity=function(b,c,f){
    null==f&&(f=!1);
    f=_.extend({
        type:"card",
        hideIfContext:f,
        _id:""+this.idAction+"_"+b.id
        },
    b);
    return c?(this._getNameForBoard(c),_.extend(f,{
        url:this.getCardUrl(c,b)
        })):f
    };
    
d.prototype.boardEntity=function(b){
    this._getNameForBoard(b);
    return null!=(null!=b?b.name:void 0)?_.extend({
        type:"board",
        url:this.getBoardUrl(b),
        _id:""+this.idAction+"_"+b.id
        },b):this.textEntity("another board")
    };
    
d.prototype.organizationEntity=function(b){
    return _.extend({
        type:"organization",
        url:this.getOrganizationUrl(b),
        _id:""+this.idAction+"_"+b.id
        },b)
    };
    
d.prototype.listEntity=function(b,c){
    var f;
    f=""+this.idAction+
    "_"+b.id;
    c&&(f+="_"+c);
    return _.extend({
        type:"list",
        _id:f
    },b)
    };
    
d.prototype.checklistEntity=function(b){
    return _.extend({
        type:"checklist",
        _id:""+this.idAction+"_"+b.id
        },b)
    };
    
d.prototype.checkItemEntity=function(b){
    return _.extend({
        type:"checkItem",
        _id:""+this.idAction+"_"+b.id
        },b)
    };
    
d.prototype.commentEntity=function(b,c){
    return{
        type:"comment",
        _id:""+this.idAction+"_comment",
        text:b,
        embedly:c
    }
};

d.prototype.labelEntity=function(b,c){
    return{
        type:"label",
        _id:""+this.idAction+"_label",
        color:b,
        text:c
    }
};

d.prototype.attachmentEntity=
function(b){
    b=_.extend({
        type:"attachment",
        _id:""+this.idAction+"_"+b.id
        },b);
    b.link=b.url&&!b.isDeleted;
    return b
    };
    
d.prototype.attachmentPreviewEntity=function(b){
    var c,b=_.extend({
        type:"attachmentPreview",
        _id:""+this.idAction+"_"+b.id+"_preview"
        },b);
    c=b.url&&!b.isDeleted;
    b.isImage=c&&/\.(png|gif|jpe?g|bmp)/i.test(b.url);
    b.canPreview=c&&(b.isImage||/\.txt/i.test(b.url));
    return b
    };
    
d.prototype.orderEntityList=function(b){
    var c,f,d,h;
    c=0;
    for(d=0,h=b.length;d<h;d++)f=b[d],f.order=c++;
    return b
    };
    
return d
}();
"undefined"!==typeof module&&null!==module&&(module.exports.EntityListGenerator=Ma)
}
if(C("sharedActionList")){
    require&&(_=require("underscore"),Ma=require("./entityListGenerator.coffee").EntityListGenerator,m=require("./sharedUtil.coffee"));
    var eb,i=function(d,c){
        return function(){
            return d.apply(c,arguments)
            }
        },D={}.hasOwnProperty,u=function(d,c){
    function b(){
        this.constructor=d
        }
        for(var e in c)D.call(c,e)&&(d[e]=c[e]);b.prototype=c.prototype;
    d.prototype=new b;
    d.__super__=c.prototype;
    return d
    },aa=[].indexOf||
function(d){
    for(var c=0,b=this.length;c<b;c++)if(c in this&&this[c]===d)return c;return-1
    };
    
eb=null;
(function(){
    var d,c,b,e;
    eb=function(b){
        function d(){
            this.getEntityLists=i(this.getEntityLists,this);
            this.getEntityList=i(this.getEntityList,this);
            this.getSingleEntityList=i(this.getSingleEntityList,this);
            this._getData=i(this._getData,this);
            this.getBoardInvitationEntityList=i(this.getBoardInvitationEntityList,this);
            this.getOrganizationInvitationEntityList=i(this.getOrganizationInvitationEntityList,this);
            this.getOrganizationEntityList=i(this.getOrganizationEntityList,this);
            this.getCheckItemEntityList=i(this.getCheckItemEntityList,this);
            this.getChecklistEntityList=i(this.getChecklistEntityList,this);
            this.getListEntityList=i(this.getListEntityList,this);
            this.getMemberEntityList=i(this.getMemberEntityList,this);
            this.getCardEntityList=i(this.getCardEntityList,this);
            this.getBoardEntityList=i(this.getBoardEntityList,this);
            this.visibleTypes=_.difference(e,c)
            }
            var h,j,l,o,q,A,n;
        u(d,b);
        o=function(b){
            return/Card$/.test(b.type)
            };
        l=function(b){
            return b.idMemberCreator
            };
            
        n=function(b){
            return"commentCard"===b||"copyCommentCard"===b||"moveCardFromBoard"===b||"moveCardToBoard"===b
            };
            
        h=function(b,c){
            var e,f;
            e=b.toJSON();
            f=c.toJSON();
            return l(e)!==l(f)||!o(e)||!o(f)||!e.data.card||!f.data.card||e.data.card.id!==f.data.card.id||n(e.type)||n(f.type)?!1:!0
            };
            
        j=function(b,c){
            var e,f;
            e=b.toJSON();
            f=c.toJSON();
            return n(f.type)||3E5<Math.abs(m.parseDate(e.date)-m.parseDate(f.date))||o(e)&&o(f)&&l(e)!==l(f)?!0:!1
            };
            
        q=function(b){
            var e,f,d,
            b=b.toJSON();
            return"updateCard"===b.type&&(null!=b.data.listBefore||null!=(null!=(e=b.data.old)?e.closed:void 0))?!1:("updateMember"===(f=b.type)||"updateOrganization"===f)&&(null==b.data.old||null!=b.data.old.prefs&&1===_.keys(b.data.old).length)?!0:(d=b.type,0<=aa.call(c,d))
            };
            
        A=function(b){
            var c,e,f,d,g,h,j,l,i,o,q,m;
            if(1===b.length)return b;
            f={};
            
            l=function(b,c){
                var e,f,d,g,h,j;
                f=["name","desc","pos","closed"];
                for(d=0,g=f.length;d<g;d++)if(e=f[d],null!=(null!=(h=b.old)?h[e]:void 0)&&null!=(null!=
                    (j=c.old)?j[e]:void 0))return!0;return null!=b.listBefore&&null!=c.listBefore
                };
                
            for(h=i=0,q=b.length;i<q;h=++i){
                c=b[h];
                for(j=o=0,m=b.length;o<m;j=++o)if(e=b[j],h!==j&&!f[c.id]&&!f[e.id]){
                    d=c.toJSON();
                    g=e.toJSON();
                    _.extend(d,d.data);
                    _.extend(g,g.data);
                    if("addMemberToCard"===d.type&&"removeMemberFromCard"===g.type&&d.idMember===g.idMember||"voteOnCard"===d.type&&"voteOnCard"===g.type&&d.voted!==g.voted||"addLabelToCard"===d.type&&"removeLabelFromCard"===g.type&&d.value===g.value||"addAttachmentToCard"===
                        d.type&&"deleteAttachmentFromCard"===g.type&&d.attachment.id===g.attachment.id||"addChecklistToCard"===d.type&&"removeChecklistFromCard"===g.type&&d.value===g.value||"updateCheckItemStateOnCard"===d.type&&"updateCheckItemStateOnCard"===g.type&&d.checkItem.name===g.checkItem.name&&d.checkItem.state!==g.checkItem.state)f[c.id]=!0,f[e.id]=!0;
                    h<j&&"updateCard"===d.type&&"updateCard"===g.type&&l(d,g)&&(f[e.id]=!0)
                    }
                }
                return _.reject(b,function(b){
            return f[b.id]
            })
        };
        
    d.prototype.getBoardEntityList=function(b,
        c){
        var e,f,d,g,h,j,l,i,o,q,m,A,n,t,k,G=this;
        switch(b.type){
            case "createBoard":
                return[this.textEntity("created"),this.boardEntity(b.board)];
            case "copyBoard":
                return[this.textEntity("copied this board from"),this.boardEntity(b.boardSource)];
            case "updateBoard":
                if(null!=(null!=(e=b.old)?e.name:void 0))return[this.textEntity("renamed"),this.boardEntity(b.board),this.textEntity("(from "+b.old.name+")")];
                if(null!=(null!=(f=b.old)?f.desc:void 0))return[this.textEntity("changed description of"),this.boardEntity(b.board)];
                if(null!=(null!=(i=b.old)?i.closed:void 0))return[this.textEntity(b.board.closed?"closed":"re-opened"),this.boardEntity(b.board)];
                if(null!=(null!=(o=b.old)?o.prefs:void 0)){
                    e=function(c,e,f,d){
                        var g;
                        g=b.board.prefs[c];
                        if("none"===g)return[G.textEntity(f),G.boardEntity(b.board)];
                        c=function(){
                            switch(g){
                                case "members":case "private":
                                    return"its members";
                                case "org":
                                    return"members of its organization";
                                case "public":
                                    return"the public";
                                case "owners":
                                    return"its admins"
                                    }
                                }();
                    return[G.textEntity(e),G.boardEntity(b.board),
                    G.textEntity(""+d+" to "+c)]
                    };
                    
                if(null!=(null!=(q=b.old)?null!=(m=q.prefs)?m.voting:void 0:void 0))return e("voting","made voting on","disabled voting on","available");
                if(null!=(null!=(A=b.old)?null!=(n=A.prefs)?n.comments:void 0:void 0))return e("comments","made commenting on","disabled commenting on","available");
                if(null!=(null!=(t=b.old)?null!=(k=t.prefs)?k.invitations:void 0:void 0))return e("invitations","made inviting on","disabled inviting on","available");
                if(null!=(null!=(d=b.old)?null!=(g=
                    d.prefs)?g.permissionLevel:void 0:void 0))return e("permissionLevel","made","hid","visible");
                if(null!=(null!=(h=b.old)?null!=(j=h.prefs)?j.selfJoin:void 0:void 0))return[this.textEntity((b.board.prefs.selfJoin?"enabled":"disabled")+" self join on"),this.boardEntity(b.board)]
                    }
                    break;
        case "addMemberToBoard":
            return null!=b.idMemberAdded?[this.textEntity("added"),this.memberEntity(b.idMemberAdded),this.textEntity("to"),this.boardEntity(b.board)]:[this.textEntity("joined"),this.boardEntity(b.board)];
        case "removeMemberFromBoard":
            return b.idMember===
            c?[this.textEntity("left"),this.boardEntity(b.board)]:[this.textEntity("removed"),this.memberEntity(b.idMember),this.textEntity("from"),this.boardEntity(b.board)];
        case "addAdminToBoard":
            return[this.textEntity("made"),this.memberEntity(b.idMember),this.textEntity("an owner of"),this.boardEntity(b.board)];
        case "removeAdminFromBoard":
            return b.idMember===c?[this.textEntity("gave up ownership of"),this.boardEntity(b.board)]:[this.textEntity("made"),this.memberEntity(b.idMember),this.textEntity("a normal user on"),
            this.boardEntity(b.board)];
        case "addToOrganizationBoard":
            return[this.textEntity("added"),this.boardEntity(b.board),this.textEntity("to"),this.organizationEntity(b.organization)];
        case "removeFromOrganizationBoard":
            return[this.textEntity("removed"),this.boardEntity(b.board),this.textEntity("from"),this.organizationEntity(null!=(l=b.organization)?l:{})];
        case "moveCardFromBoard":
            return[this.textEntity("transferred"),this.cardEntity(b.card,b.boardTarget),this.textEntity("to"),this.boardEntity(b.boardTarget)];
        case "moveCardToBoard":
            return[this.textEntity("transferred"),this.cardEntity(b.card,b.board),this.textEntity("from"),this.boardEntity(b.boardSource)]
            }
        };

d.prototype.getCardEntityList=function(b,c,e){
    var f,d,g,h,j,l;
    f=null!=(d=e.grouped)?d:!1;
    if(e.includeBoard)return _.flatten([this.getCardEntityList(b,c,_.extend({},e,{
        includeBoard:!1
        })),this.textEntity("on"),this.boardEntity(b.board)]);
    switch(b.type){
        case "createCard":
            return[this.textEntity("added"),this.cardEntity(b.card,b.board),this.textEntity("to"),
            this.listEntity(b.list)];
        case "copyCard":
            return[this.textEntity("copied"),this.cardEntity(b.card,b.board),this.textEntity("from"),this.cardEntity(b.cardSource,b.board),this.textEntity("in list"),this.listEntity(b.list)];
        case "updateCard":
            if(null!=b.listBefore)return f?[this.textEntity("moved from"),this.listEntity(b.listBefore,"old"),this.textEntity("to"),this.listEntity(b.listAfter)]:[this.textEntity("moved"),this.cardEntity(b.card,b.board),this.textEntity("from"),this.listEntity(b.listBefore,"old"),
            this.textEntity("to"),this.listEntity(b.listAfter)];
        if(null!=(null!=(g=b.old)?g.name:void 0))return f?[this.textEntity("changed the name (from "+b.old.name+")")]:[this.textEntity("renamed"),this.cardEntity(b.card,b.board),this.textEntity("(from "+b.old.name+")")];
            if(null!=(null!=(h=b.old)?h.desc:void 0))return f?[this.textEntity("changed description")]:[this.textEntity("changed description of"),this.cardEntity(b.card,b.board)];
            if(null!=(null!=(j=b.old)?j.pos:void 0))return c=b.old.pos<b.card.pos,
            f?[this.textEntity("moved "+(c?"higher":"lower")+" in"),this.listEntity(b.list)]:[this.textEntity("moved"),this.cardEntity(b.card,b.board),this.textEntity((c?"higher":"lower")+" in"),this.listEntity(b.list)];
        if(null!=(null!=(l=b.old)?l.closed:void 0)){
            if(f)return[this.textEntity(b.card.closed?"archived":"sent to the board")];
            f=[this.textEntity(b.card.closed?"archived":"sent"),this.cardEntity(b.card,b.board)];
            b.card.closed||f.push(this.textEntity("to the board"));
            return f
            }
            break;
        case "commentCard":
            return[this.textEntity("on",
            b.card.id,!0),this.cardEntity(b.card,b.board,!0),this.commentEntity(b.text,b.embedly)];
        case "copyCommentCard":
            return[this.textEntity("copied comment by"),this.memberEntity(b.idOriginalCommenter),this.textEntity("from card"),this.cardEntity(b.cardSource,b.board,!0),this.commentEntity(b.text,b.embedly)];
        case "addMemberToCard":
            return b.idMember===c?f?[this.textEntity("joined")]:[this.textEntity("joined"),this.cardEntity(b.card,b.board)]:f?[this.textEntity("added"),this.memberEntity(b.idMember)]:[this.textEntity("added"),
            this.memberEntity(b.idMember),this.textEntity("to"),this.cardEntity(b.card,b.board)];
        case "removeMemberFromCard":
            return b.idMember===c?f?[this.textEntity("left")]:[this.textEntity("left"),this.cardEntity(b.card,b.board)]:f?[this.textEntity("removed"),this.memberEntity(b.idMember)]:[this.textEntity("removed"),this.memberEntity(b.idMember),this.textEntity("from"),this.cardEntity(b.card,b.board)];
        case "addChecklistToCard":
            return f?[this.textEntity("added"),this.checklistEntity(b.checklist)]:[this.textEntity("added"),
            this.checklistEntity(b.checklist),this.textEntity("to"),this.cardEntity(b.card,b.board)];
        case "removeChecklistFromCard":
            return f?[this.textEntity("removed"),this.checklistEntity(b.checklist)]:[this.textEntity("removed"),this.checklistEntity(b.checklist),this.textEntity("from"),this.cardEntity(b.card,b.board)];
        case "voteOnCard":
            return[this.textEntity(b.voted?"voted for":"removed vote for"),this.cardEntity(b.card,b.board)];
        case "addLabelToCard":
            return f?[this.textEntity("added"),this.labelEntity(b.value,
            b.text)]:[this.textEntity("added the"),this.labelEntity(b.value,b.text),this.textEntity("label to"),this.cardEntity(b.card,b.board)];
        case "removeLabelFromCard":
            return f?[this.textEntity("removed"),this.labelEntity(b.value,b.text)]:[this.textEntity("removed the"),this.labelEntity(b.value,b.text),this.textEntity("label from"),this.cardEntity(b.card,b.board)];
        case "updateCheckItemStateOnCard":
            c="complete"===b.checkItem.state;
            return f?(f=[this.textEntity(c?"completed":"marked"),this.checkItemEntity(b.checkItem)],
            c||f.push(this.textEntity("incomplete")),f):[this.textEntity(c?"completed":"marked"),this.checkItemEntity(b.checkItem),this.textEntity(c?"on":"incomplete on"),this.cardEntity(b.card,b.board)];
        case "addAttachmentToCard":
            return f?[this.textEntity("attached"),this.attachmentEntity(b.attachment),this.attachmentPreviewEntity(b.attachment)]:[this.textEntity("attached"),this.attachmentEntity(b.attachment),this.textEntity("to"),this.cardEntity(b.card,b.board),this.attachmentPreviewEntity(b.attachment)];
        case "deleteAttachmentFromCard":
            return f?
            [this.textEntity("deleted"),this.attachmentEntity(b.attachment)]:[this.textEntity("deleted the"),this.attachmentEntity(b.attachment),this.textEntity("attachment from"),this.cardEntity(b.card,b.board)]
            }
        };

d.prototype.getMemberEntityList=function(b){
    var c,e,f,d;
    switch(b.type){
        case "updateMember":
            if(null!=(null!=(c=b.old)?c.bio:void 0))return[this.textEntity("updated their bio")];
            if(null!=(null!=(e=b.old)?e.username:void 0))return[this.textEntity("updated their username")];
            if(null!=(null!=(f=b.old)?f.initials:
            void 0))return[this.textEntity("updated their initials")];
            if(null!=(null!=(d=b.old)?d.fullName:void 0))return[this.textEntity("updated their display name")]
            }
        };

d.prototype.getListEntityList=function(b,c,e){
    var f,d,g,h;
    if(e.includeBoard)return _.flatten([this.getListEntityList(b,c,_.extend({},e,{
        includeBoard:!1
        })),this.textEntity("on"),this.boardEntity(b.board)]);
    switch(b.type){
        case "createList":
            return[this.textEntity("added"),this.listEntity(b.list),this.textEntity("to"),this.boardEntity(b.board)];
        case "updateList":
            if(null!=(null!=(d=b.old)?d.name:void 0))return[this.textEntity("renamed"),this.listEntity(b.list),this.textEntity("(from "+b.old.name+")")];
            if(null!=(null!=(g=b.old)?g.pos:void 0))return c=(null!=(f=b.old)?f.pos:void 0)>b.list.pos,[this.textEntity("moved"),this.listEntity(b.list),this.textEntity((c?"left":"right")+" on"),this.boardEntity(b.board)];
            if(null!=(null!=(h=b.old)?h.closed:void 0))return f=[this.textEntity(b.list.closed?"archived":"sent"),this.listEntity(b.list)],b.list.closed||
            f.push(this.textEntity("to the board")),f
            }
        };

d.prototype.getChecklistEntityList=function(b){
    var c;
    switch(b.type){
        case "createChecklist":
            return[this.textEntity("created"),this.checklistEntity(b.checklist),this.textEntity("on"),this.cardEntity(b.card,b.board)];
        case "updateChecklist":
            if(null!=(null!=(c=b.old)?c.name:void 0))return[this.textEntity("renamed"),this.checklistEntity(b.checklist),this.textEntity("(from "+b.old.name+")")]
            }
        };

d.prototype.getCheckItemEntityList=function(b){
    var c,e;
    switch(b.type){
        case "updateCheckItem":
            if(null!=
            (null!=(c=b.old)?c.name:void 0))return[this.textEntity("renamed"),this.checkItemEntity(b.checkItem),this.textEntity("(from "+b.old.name+")")];
            if(null!=(null!=(e=b.old)?e.pos:void 0))return c=b.old.pos>b.checkItem.pos,[this.textEntity("moved"),this.checkItemEntity(b.checkItem),this.textEntity((c?"higher":"lower")+" in the checklist"),this.checklistEntity(b.checklist)];
            break;
        case "deleteCheckItem":
            return[this.textEntity("deleted task"),this.checkItemEntity(b.checkItem),this.textEntity("on"),this.checklistEntity(b.checklist)];
        case "convertToCardFromCheckItem":
            return[this.textEntity("converted"),this.cardEntity(b.card,b.board),this.textEntity("from a checklist item on"),this.cardEntity(b.cardSource,b.board)]
            }
        };

d.prototype.getOrganizationEntityList=function(b,c){
    var e,f,d,g;
    switch(b.type){
        case "createOrganization":
            return[this.textEntity("created"),this.organizationEntity(b.organization)];
        case "updateOrganization":
            if(null!=(null!=(e=b.old)?e.description:void 0))return[this.textEntity("changed description of"),this.organizationEntity(b.organization)];
            if(null!=(null!=(f=b.old)?f.name:void 0))return[this.textEntity("changed name of"),this.organizationEntity(b.organization)];
            if(null!=(null!=(d=b.old)?d.displayName:void 0))return[this.textEntity("changed display name of"),this.organizationEntity(b.organization)];
            if(null!=(null!=(g=b.old)?g.website:void 0))return[this.textEntity("changed website of"),this.organizationEntity(b.organization)];
            break;
        case "addMemberToOrganization":
            return[this.textEntity("joined"),this.organizationEntity(b.organization)];
        case "removeMemberFromOrganization":
            return b.idMember===c?[this.textEntity("left"),this.organizationEntity(b.organization)]:[this.textEntity("removed"),this.memberEntity(b.idMember),this.textEntity("from"),this.organizationEntity(b.organization)];
        case "addAdminToOrganization":
            return[this.textEntity("made"),this.memberEntity(b.idMember),this.textEntity("an owner of"),this.organizationEntity(b.organization)];
        case "removeAdminFromOrganization":
            return b.idMember===c?[this.textEntity("gave up ownership of"),
            this.organizationEntity(b.organization)]:[this.textEntity("made"),this.memberEntity(b.idMember),this.textEntity("a normal user on"),this.organizationEntity(b.organization)]
            }
        };

d.prototype.getOrganizationInvitationEntityList=function(b){
    switch(b.type){
        case "createOrganizationInvitation":
            return[this.textEntity("created an invitation to"),this.organizationEntity(b.organization)];
        case "deleteOrganizationInvitation":
            return[this.textEntity("deleted an invitation to"),this.organizationEntity(b.organization)]
            }
        };
d.prototype.getBoardInvitationEntityList=function(b){
    switch(b.type){
        case "createBoardInvitation":
            return[this.textEntity("created an invitation to"),this.boardEntity(b.board)];
        case "deleteBoardInvitation":
            return[this.textEntity("deleted an invitation to"),this.boardEntity(b.board)]
            }
        };

d.prototype._getData=function(b,c){
    var e,f,d,g,h,j;
    e=c.toJSON();
    d=b.toJSON();
    e=_.extend({},e,e.data);
    j=["card","list","board"];
    for(g=0,h=j.length;g<h;g++)f=j[g],null!=d.data[f]&&(e.data[f]=d.data[f]);
    return e
    };
    
d.prototype.getSingleEntityList=
function(b,c,e){
    var f,c=this._getData(b,c),b=this.memberEntity(c.idMemberCreator);
    f={
        Board:"getBoardEntityList",
        Member:"getMemberEntityList",
        Card:"getCardEntityList",
        List:"getListEntityList",
        Checklist:"getChecklistEntityList",
        CheckItem:"getCheckItemEntityList",
        Organization:"getOrganizationEntityList",
        OrganizationInvitation:"getOrganizationInvitationEntityList",
        BoardInvitation:"getBoardInvitationEntityList"
    };
    
        a:{
        var d,g;
        for(g in f)if(d=f[g],RegExp(g+"$").test(c.type)){
            e=this[d](c,b.id,e);
            break a
        }
        e=
        void 0
        }
        null==e&&(e=[]);
    e.unshift(b);
    this.orderEntityList(e);
    return e
    };
    
d.prototype.getEntityList=function(b,c,e){
    var f,d,g,h,j,l,i;
    this.idAction=this.getId(c[0]);
    if(1===c.length)return b=this.getSingleEntityList(b,c[0],e),{
        entities:b,
        list:b
    };
    
    j=this.memberEntity(c[0].get("idMemberCreator"));
    g=_.detect(c,function(b){
        return"createCard"===b.get("type")||"copyCard"===b.get("type")
        });
    d=[];
    for(l=0,i=c.length;l<i;l++)if(f=c[l],"createCard"!==f.get("type")&&(h=f.toJSON(),_.extend(h,h.data),this.idAction=this.getId(f),
        f=this.getCardEntityList(h,j.id,_.extend({},e,{
            grouped:!0
            }))))this.orderEntityList(f),d.push({
        _id:this.idAction,
        entities:f,
        list:f
    });this.idAction=this.getId(c[0]);
    f=[j];
    g?(f=f.concat(this.getCardEntityList(this._getData(b,g),j.id,_.extend({},e,{
        grouped:!0
        }))),f.push(this.textEntity("and"))):f.push(this.cardEntity(b.get("data").card,c[0].get("data").board,!0));
    this.orderEntityList(f);
    return{
        entities:f,
        list:f,
        children:d
    }
};

d.prototype.getMember=function(){
    throw"NotImplemented";
};

d.prototype.getBoard=
function(){
    return{}
};

d.prototype.getEntityLists=function(b,c){
    var e,f,d,g,l,i,o,m,n,t,G;
    null==c&&(c={});
    c=_.extend({},{
        compact:!0
        },c);
    m=0;
    g=[];
    d={};
    
    for(l=n=0,t=b.length;n<t;l=++n)if(e=b[l],!d[e.id]){
        if(null!=c.limit&&m>=c.limit)break;
        f=[e];
        for(i=l=o=l+1,G=b.length;o<=G?l<G:l>G;i=o<=G?++l:--l){
            i=b[i];
            if(j(e,i))break;
            h(e,i)&&(f.push(i),d[i.id]=!0)
            }
            _.isEmpty(f)||(o=f[0],f=A(_.reject(f,q)),null!=c.excludeTypes&&(f=_.filter(f,function(b){
            var e;
            return e=b.get("type"),0>aa.call(c.excludeTypes,e)
            })),_.isEmpty(f)||
            (l=_.pluck([o].concat(f),"id").join("_"),c.key&&(l=c.key+"_"+l),e=f[0].get("date"),g.push(_.extend(this.getEntityList(o,f,c),{
                db_id:this.getId(f[0]),
                _id:l,
                date:e
            })),m++))
        }
        return g
    };
    
return d
}.call(this,Ma);
e="addAdminToBoard,addAdminToOrganization,addAttachmentToCard,addBoardsPinnedToMember,addChecklistToCard,addLabelToCard,addMemberToBoard,addMemberToCard,addMemberToOrganization,addToOrganizationBoard,commentCard,copyCommentCard,convertToCardFromCheckItem,copyBoard,createBoard,createBoardInvitation,createBoardPreference,createCard,copyCard,createChecklist,createList,createOrganization,createOrganizationInvitation,deleteAttachmentFromCard,deleteBoardInvitation,deleteCheckItem,deleteOrganizationInvitation,moveCardFromBoard,moveCardToBoard,removeAdminFromBoard,removeAdminFromOrganization,removeBoardsPinnedFromMember,removeChecklistFromCard,removeFromOrganizationBoard,removeLabelFromCard,removeMemberFromBoard,removeMemberFromCard,removeMemberFromOrganization,updateBoard,updateCard,updateCheckItem,updateCheckItemStateOnCard,updateChecklist,updateList,updateMember,updateOrganization,voteOnCard".split(",");
b=["updateCard:idList","updateCard:closed","updateCard:desc","updateCard:name"];
c="addAdminToBoard,addAdminToOrganization,addBoardsPinnedToMember,addLabelToCard,createBoardInvitation,createBoardPreference,createChecklist,createOrganizationInvitation,deleteCheckItem,removeBoardsPinnedFromMember,removeLabelFromCard,removeMemberFromBoard,removeMemberFromOrganization,updateCard,updateCheckItem,updateList,voteOnCard".split(",");
d=_.difference(c,["updateCard"]);
d=_.difference(_.union(e,b),d);
return"undefined"!==
typeof module&&null!==module?_.extend(module.exports,{
    SharedActionList:eb,
    types:e,
    ignoredTypes:c,
    qualifiedTypes:b,
    allowedTypesApi:d
}):eb
})()
}
if(C("sharedNotification")){
    require&&(_=require("underscore"),Ma=require("./entityListGenerator.coffee").EntityListGenerator);
    var Ib,i=function(d,c){
        return function(){
            return d.apply(c,arguments)
            }
        },D={}.hasOwnProperty,u=function(d,c){
    function b(){
        this.constructor=d
        }
        for(var e in c)D.call(c,e)&&(d[e]=c[e]);b.prototype=c.prototype;
    d.prototype=new b;
    d.__super__=c.prototype;
    return d
    };
    
Ib=function(d){
    function c(){
        this.getEntityLists=i(this.getEntityLists,this);
        this.getEntityList=i(this.getEntityList,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.getEntityList=function(b){
        var c,f,d,h,j,l,i,q,m,n;
        this.idAction=this.getId(b);
        _.isFunction(b.toJSON)&&(b=b.toJSON());
        c=b.data;
        f=[this.memberEntity(b.idMemberCreator)];
        if(/Card$/.test(b.type)){
            switch(b.type){
                case "addedMemberToCard":
                    b.idMemberCreator===(null!=(d=c.member)?d.id:void 0)?f.push(this.textEntity("joined the card")):
                    (f.push(this.textEntity("added")),f.push(this.memberEntity(null!=(h=c.member)?h.id:void 0)),f.push(this.textEntity("to the card")));
                    break;
                case "removedMemberFromCard":
                    b.idMemberCreator===(null!=(j=c.member)?j.id:void 0)?f.push(this.textEntity("left the card")):(f.push(this.textEntity("removed")),f.push(this.memberEntity(null!=(l=c.member)?l.id:void 0)),f.push(this.textEntity("from the card")));
                    break;
                case "changeCard":
                    null!=(null!=(i=c.old)?i.name:void 0)?f.push(this.textEntity("renamed the card")):
                    null!=(null!=(q=c.old)?q.desc:void 0)?f.push(this.textEntity("updated the description of the card")):null!=(null!=(m=c.old)?m.closed:void 0)?c.card.closed?f.push(this.textEntity("archived the card")):f.push(this.textEntity("unarchived the card")):null!=c.listAfter?f.push(this.textEntity("moved the card")):f.push(this.textEntity("changed the card"));
                    break;
                default:
                    f.push(this.textEntity({
                    commentCard:"commented on the card",
                    addedToCard:"added you to the card",
                    removedFromCard:"removed you from the card",
                    mentionedOnCard:"mentioned you on the card"
                }
                [b.type]))
                }
                f.push(this.cardEntity(c.card,c.board));
            "changeCard"===b.type&&null!=c.listAfter&&(f.push(this.textEntity("to")),f.push(this.listEntity(c.listAfter)));
            f.push(this.textEntity("on"));
            f.push(this.boardEntity(c.board));
            ("commentCard"===(n=b.type)||"mentionedOnCard"===n)&&null!=c.text&&f.push(this.commentEntity(c.text))
            }else/Board$/.test(b.type)?(f.push(this.textEntity({
            removedFromBoard:"removed you from the board",
            invitedToBoard:"invited you to the board",
            addedToBoard:"added you to the board",
            addAdminToBoard:"made you a co-owner on the board",
            closeBoard:"closed the board"
        }
        [b.type])),f.push(this.boardEntity(c.board))):/Organization$/.test(b.type)&&(f.push(this.textEntity({
            removedFromOrganization:"removed you from the organization",
            invitedToOrganization:"invited you to the organization",
            addAdminToOrganization:"made you an admin on the organization"
        }
        [b.type])),f.push(this.organizationEntity(c.organization)));
        for(c=0,d=f.length;c<d;c++)b=f[c],b[b.type+
            "Type"]=!0;
        return this.orderEntityList(f)
        };
        
    c.prototype.getEntityLists=function(b){
        var c,f,d,h;
        h=[];
        for(f=0,d=b.length;f<d;f++)c=b[f],h.push(this.getEntityList(c));
        return h
        };
        
    return c
    }(Ma);
"undefined"!==typeof module&&null!==module&&(module.exports.SharedNotification=Ib)
}
if(C("sharedABTest")){
    require&&(_=require("underscore"));
    var Jb;
    Jb=function(){
        function d(){}
        d.prototype.getDefaultId=function(){
            return""
            };
            
        d.prototype.event=function(){};
        
        d.prototype.inTest=function(c,b){
            null==b&&(b=this.getDefaultId());
            return 0!==parseInt(this._hasher(b+c)[0],16)%2
            };
            
        d.prototype.templateData=function(c,b){
            var e,f,d,h,j;
            f=/{{[\#\^]AB_([a-z0-9_]*)}}/ig;
            for(e={};
                d=null!=(j=f.exec(c))?j[1]:void 0;)if(null==e[h="AB_"+d])e[h]=this.inTest(d,b);return e
            };
            
        d.prototype._hasher=function(){
            var c,b,e,f,d,h,j,l,i,q,m,n,s,t;
            f=0;
            n=function(e){
                return c(b(q(e),8*e.length))
                };
                
            m=function(b){
                var c,e,d,g;
                try{
                    f
                    }catch(h){
                    f=0
                    }
                    c=f?"0123456789ABCDEF":"0123456789abcdef";
                d="";
                for(e=0;e<b.length;)g=b.charCodeAt(e),d+=c.charAt(g>>>4&15)+c.charAt(g&
                    15),e++;
                return d
                };
                
            t=function(b){
                var c,e,f,d;
                e="";
                for(c=-1;++c<b.length;)f=b.charCodeAt(c),d=c+1<b.length?b.charCodeAt(c+1):0,55296<=f&&56319>=f&&56320<=d&&57343>=d&&(f=65536+((f&1023)<<10)+(d&1023),c++),127>=f?e+=String.fromCharCode(f):2047>=f?e+=String.fromCharCode(192|f>>>6&31,128|f&63):65535>=f?e+=String.fromCharCode(224|f>>>12&15,128|f>>>6&63,128|f&63):2097151>=f&&(e+=String.fromCharCode(240|f>>>18&7,128|f>>>12&63,128|f>>>6&63,128|f&63));
                return e
                };
                
            q=function(b){
                var c,e;
                e=Array(b.length>>2);
                for(c=
                    0;c<e.length;)e[c]=0,c++;
                for(c=0;c<8*b.length;)e[c>>5]|=(b.charCodeAt(c/8)&255)<<c%32,c+=8;
                return e
                };
                
            c=function(b){
                var c,e;
                e="";
                for(c=0;c<32*b.length;)e+=String.fromCharCode(b[c>>5]>>>c%32&255),c+=8;
                return e
                };
                
            b=function(b,c){
                var e,f,d,g,q,m,A,n,t;
                b[c>>5]|=128<<c%32;
                b[(c+64>>>9<<4)+14]=c;
                e=1732584193;
                f=-271733879;
                d=-1732584194;
                g=271733878;
                for(q=0;q<b.length;)m=e,A=f,n=d,t=g,e=h(e,f,d,g,b[q+0],7,-680876936),g=h(g,e,f,d,b[q+1],12,-389564586),d=h(d,g,e,f,b[q+2],17,606105819),f=h(f,d,g,e,b[q+3],22,-1044525330),
                    e=h(e,f,d,g,b[q+4],7,-176418897),g=h(g,e,f,d,b[q+5],12,1200080426),d=h(d,g,e,f,b[q+6],17,-1473231341),f=h(f,d,g,e,b[q+7],22,-45705983),e=h(e,f,d,g,b[q+8],7,1770035416),g=h(g,e,f,d,b[q+9],12,-1958414417),d=h(d,g,e,f,b[q+10],17,-42063),f=h(f,d,g,e,b[q+11],22,-1990404162),e=h(e,f,d,g,b[q+12],7,1804603682),g=h(g,e,f,d,b[q+13],12,-40341101),d=h(d,g,e,f,b[q+14],17,-1502002290),f=h(f,d,g,e,b[q+15],22,1236535329),e=j(e,f,d,g,b[q+1],5,-165796510),g=j(g,e,f,d,b[q+6],9,-1069501632),d=j(d,g,e,f,b[q+11],14,643717713),
                    f=j(f,d,g,e,b[q+0],20,-373897302),e=j(e,f,d,g,b[q+5],5,-701558691),g=j(g,e,f,d,b[q+10],9,38016083),d=j(d,g,e,f,b[q+15],14,-660478335),f=j(f,d,g,e,b[q+4],20,-405537848),e=j(e,f,d,g,b[q+9],5,568446438),g=j(g,e,f,d,b[q+14],9,-1019803690),d=j(d,g,e,f,b[q+3],14,-187363961),f=j(f,d,g,e,b[q+8],20,1163531501),e=j(e,f,d,g,b[q+13],5,-1444681467),g=j(g,e,f,d,b[q+2],9,-51403784),d=j(d,g,e,f,b[q+7],14,1735328473),f=j(f,d,g,e,b[q+12],20,-1926607734),e=l(e,f,d,g,b[q+5],4,-378558),g=l(g,e,f,d,b[q+8],11,-2022574463),
                    d=l(d,g,e,f,b[q+11],16,1839030562),f=l(f,d,g,e,b[q+14],23,-35309556),e=l(e,f,d,g,b[q+1],4,-1530992060),g=l(g,e,f,d,b[q+4],11,1272893353),d=l(d,g,e,f,b[q+7],16,-155497632),f=l(f,d,g,e,b[q+10],23,-1094730640),e=l(e,f,d,g,b[q+13],4,681279174),g=l(g,e,f,d,b[q+0],11,-358537222),d=l(d,g,e,f,b[q+3],16,-722521979),f=l(f,d,g,e,b[q+6],23,76029189),e=l(e,f,d,g,b[q+9],4,-640364487),g=l(g,e,f,d,b[q+12],11,-421815835),d=l(d,g,e,f,b[q+15],16,530742520),f=l(f,d,g,e,b[q+2],23,-995338651),e=i(e,f,d,g,b[q+0],6,-198630844),
                    g=i(g,e,f,d,b[q+7],10,1126891415),d=i(d,g,e,f,b[q+14],15,-1416354905),f=i(f,d,g,e,b[q+5],21,-57434055),e=i(e,f,d,g,b[q+12],6,1700485571),g=i(g,e,f,d,b[q+3],10,-1894986606),d=i(d,g,e,f,b[q+10],15,-1051523),f=i(f,d,g,e,b[q+1],21,-2054922799),e=i(e,f,d,g,b[q+8],6,1873313359),g=i(g,e,f,d,b[q+15],10,-30611744),d=i(d,g,e,f,b[q+6],15,-1560198380),f=i(f,d,g,e,b[q+13],21,1309151649),e=i(e,f,d,g,b[q+4],6,-145523070),g=i(g,e,f,d,b[q+11],10,-1120210379),d=i(d,g,e,f,b[q+2],15,718787259),f=i(f,d,g,e,b[q+9],21,
                        -343485551),e=s(e,m),f=s(f,A),d=s(d,n),g=s(g,t),q+=16;
                return[e,f,d,g]
                };
                
            d=function(b,c,f,d,g,h){
                return s(e(s(s(c,b),s(d,h)),g),f)
                };
                
            h=function(b,c,e,f,h,j,l){
                return d(c&e|~c&f,b,c,h,j,l)
                };
                
            j=function(b,c,e,f,h,j,l){
                return d(c&f|e&~f,b,c,h,j,l)
                };
                
            l=function(b,c,e,f,h,j,l){
                return d(c^e^f,b,c,h,j,l)
                };
                
            i=function(b,c,e,f,h,j,l){
                return d(e^(c|~f),b,c,h,j,l)
                };
                
            s=function(b,c){
                var e;
                e=(b&65535)+(c&65535);
                return(b>>16)+(c>>16)+(e>>16)<<16|e&65535
                };
                
            e=function(b,c){
                return b<<c|b>>>32-c
                };
                
            return function(b){
                return m(n(t(b)))
                }
            }();
    return d
    }();
"undefined"!==typeof module&&null!==module&&(module.exports=Jb)
}
if(C("payloads")){
    var Ba,Bc,Cc,Dc,Na,Ec,Fc,Kb,Gc,Hc,Ic;
    Na="addAttachmentToCard,addChecklistToCard,addMemberToCard,commentCard,copyCommentCard,convertToCardFromCheckItem,createCard,copyCard,deleteAttachmentFromCard,moveCardFromBoard,moveCardToBoard,removeChecklistFromCard,removeMemberFromCard,updateCard:idList,updateCard:closed,updateCheckItemStateOnCard";
    Ba=[Na,"addMemberToBoard,addToOrganizationBoard,copyBoard,createBoard,createList,removeAdminFromBoard,removeFromOrganizationBoard,updateBoard"].join();
    Kb=[Ba,"updateMember"].join();
    Bc={
        cards:"visible",
        members:"all",
        member_fields:"fullName,initials,username,avatarHash,bio,status",
        membersInvited:"all",
        membersInvited_fields:"fullName,initials,username,avatarHash,bio",
        organization:!0,
        organization_fields:"name,displayName,desc,memberships",
        myPrefs:!0,
        fields:"name,desc,closed,idOrganization,pinned,url,prefs,invitations,memberships,labelNames,invited"
    };
    
    Dc=function(d){
        return{
            boards:d,
            board_fields:"name,idOrganization",
            organizations:"all",
            organization_fields:"name,displayName"
        }
    };
Cc={
    fields:"",
    idBoardsPinned:!0,
    boards:"pinned",
    board_fields:"name,closed,prefs,idOrganization",
    board_actions:Ba,
    board_actions_format:"count",
    board_actions_limit:101,
    board_actions_since:"lastView",
    organizations:"all",
    organization_fields:"name,displayName,prefs"
};

Na={
    actions:Na,
    members:!0,
    member_fields:"fullName,initials,username,avatarHash,bio,status",
    actions_limit:1E3,
    attachments:!0
    };
    
Ec={
    lists:"all",
    cards:"visible",
    members:"all",
    member_fields:"fullName,initials,username,avatarHash,bio,status",
    membersInvited:"all",
    membersInvited_fields:"fullName,initials,username,avatarHash,bio",
    checklists:"all",
    organization:!0,
    organization_fields:"name,displayName,desc,url,website,memberships",
    myPrefs:!0,
    actions:Ba,
    actions_limit:50,
    fields:"name,desc,closed,idOrganization,pinned,url,prefs,invitations,memberships,labelNames,invited"
};

Fc={
    tokens:"all"
};

Gc={
    boards:"open",
    board_fields:"name,closed,prefs,idOrganization",
    board_actions:Ba,
    board_actions_format:"count",
    board_actions_limit:101,
    board_actions_since:"lastView",
    boardsInvited:"all",
    boardsInvited_fields:"name,closed,prefs,idOrganization",
    organizations:"all",
    organization_fields:"name,displayName,prefs",
    organizationsInvited:"all",
    organizationsInvited_fields:"name,displayName,prefs"
};

Hc={
    actions:"all",
    actions_limit:50,
    organizations:"all",
    organization_fields:"name,displayName,prefs",
    boards:"open",
    board_fields:"name,prefs,idOrganization"
};

Ic={
    boards:"all",
    board_fields:"name,closed,prefs,idOrganization,memberships",
    board_actions:Ba,
    board_actions_format:"count",
    board_actions_limit:101,
    board_actions_since:"lastView",
    fields:"all",
    members:"all",
    member_fields:"fullName,initials,username,avatarHash,status,bio"
}
}
if(C("storage")){
    var T;
    T=new (function(){
        function d(){}
        d.prototype._storage=y.localStorage;
        d.prototype.enabled=function(){
            return null!=this._storage
            };
            
        d.prototype.set=function(c,b){
            var e;
            return null!=(e=this._storage)?e[c]=JSON.stringify(b):void 0
            };
            
        d.prototype.get=function(c){
            var b;
            if(c=null!=(b=this._storage)?b[c]:void 0)try{
                return JSON.parse(c)
                }catch(e){
                return null
                }else return null
                };
        d.prototype.unset=function(c){
            var b,e;
            if(null!=(null!=(b=this._storage)?b[c]:void 0))return null!=(e=this._storage)?delete e[c]:void 0
                };
                
        return d
        }())
    }
    if(C("logger")){
    var Lb,J,i=function(d,c){
        return function(){
            return d.apply(c,arguments)
            }
        },W=[].slice;
Lb=new (function(){
    function d(){
        this.log=i(this.log,this);
        var c;
        this.enabled=null!=(c=T.get("loggers"))?c:{};
        
        this.historyMap={};
        
        this.logHistory=!1
        }
        d.prototype.log=function(){
        var c,b,e;
        e=arguments[0];
        c=2<=arguments.length?W.call(arguments,1):[];
        if("undefined"!==
            typeof console&&null!==console&&console.log&&(0===c.length?(b=!0,c.push(e),e="all"):b=this.enabled.all||this.enabled[e],b&&(1===c.length&&_.isArray(c[0])&&(c=c[0]),c.unshift(e),$("body").is(".chrome")?console.log(c):console.dir(c)),this.logHistory)){
            if(null==(b=this.historyMap)[e])b[e]=[];
            this.historyMap[e].push(c)
            }
        };
    
d.prototype.enable=function(c){
    null==c&&(c="all");
    this.enabled[c]=!0;
    this.save()
    };
    
d.prototype.disable=function(c){
    null==c&&(c="all");
    delete this.enabled[c];
    this.save()
    };
    
d.prototype.disableAll=
function(){
    this.enabled={};
    
    this.save()
    };
    
d.prototype.enableAll=function(){
    this.enabled.all=!0;
    this.save()
    };
    
d.prototype.history=function(c){
    var b,e,f;
    if(c in this.historyMap){
        f=this.historyMap[c];
        for(b=0,e=f.length;b<e;b++)c=f[b],"undefined"!==typeof console&&null!==console&&"function"===typeof console.log&&console.log(c)
            }
        };

d.prototype.list=function(){
    "undefined"!==typeof console&&null!==console&&"function"===typeof console.log&&console.log(_.keys(this.historyMap))
    };
    
d.prototype.save=function(){
    T.set("loggers",
        this.enabled)
    };
    
return d
}());
J=Lb.log;
y.Logger=Lb
}
if(C("browser")){
    var Jc,Oa,i=function(d,c){
        return function(){
            return d.apply(c,arguments)
            }
        };
    
Jc=function(){
    function d(){
        this.searchVersion=i(this.searchVersion,this);
        this.searchString=i(this.searchString,this);
        this.browser=this.searchString(this.dataBrowser)||"unknown-browser";
        this.version=this.searchVersion(navigator.userAgent)||this.searchVersion(navigator.appVersion)||"unknown-browser-version";
        this.OS=this.searchString(this.dataOS)||"unknown-os"
        }
        d.prototype.searchString=
    function(c){
        var b,e,f;
        for(e=0,f=c.length;e<f;e++)if(b=c[e],this.versionSearchString=b.versionSearch||b.identity,b.string&&-1!==b.string.indexOf(b.subString)||b.prop)return b.identity
            };
            
    d.prototype.searchVersion=function(c){
        var b;
        b=c.indexOf(this.versionSearchString);
        return-1===b?void 0:parseFloat(c.substring(b+this.versionSearchString.length+1))
        };
        
    d.prototype.dataBrowser=[{
        string:navigator.userAgent,
        subString:"Chrome",
        identity:"Chrome"
    },{
        string:navigator.userAgent,
        subString:"OmniWeb",
        versionSearch:"OmniWeb/",
        identity:"OmniWeb"
    },{
        string:navigator.vendor,
        subString:"Apple",
        identity:"Safari",
        versionSearch:"Version"
    },{
        prop:y.opera,
        identity:"Opera"
    },{
        string:navigator.vendor,
        subString:"iCab",
        identity:"iCab"
    },{
        string:navigator.vendor,
        subString:"KDE",
        identity:"Konqueror"
    },{
        string:navigator.userAgent,
        subString:"Firefox",
        identity:"Firefox"
    },{
        string:navigator.vendor,
        subString:"Camino",
        identity:"Camino"
    },{
        string:navigator.userAgent,
        subString:"Netscape",
        identity:"Netscape"
    },{
        string:navigator.userAgent,
        subString:"MSIE",
        identity:"Explorer",
        versionSearch:"MSIE"
    },{
        string:navigator.userAgent,
        subString:"Gecko",
        identity:"Mozilla",
        versionSearch:"rv"
    },{
        string:navigator.userAgent,
        subString:"Mozilla",
        identity:"Netscape",
        versionSearch:"Mozilla"
    }];
    d.prototype.dataOS=[{
        string:navigator.platform,
        subString:"Win",
        identity:"Windows"
    },{
        string:navigator.platform,
        subString:"Mac",
        identity:"Mac"
    },{
        string:navigator.userAgent,
        subString:"iPhone",
        identity:"iPhone"
    },{
        string:navigator.userAgent,
        subString:"iPod",
        identity:"iPod"
    },{
        string:navigator.userAgent,
        subString:"iPad",
        identity:"iPad"
    },{
        string:navigator.userAgent,
        subString:"Android",
        identity:"Android"
    },{
        string:navigator.platform,
        subString:"Linux",
        identity:"Linux"
    }];
    return d
    }();
Oa=y.browserDetect=new Jc;
y.Browser=new (function(){
    function d(){
        this.isTouch=i(this.isTouch,this);
        this.init=i(this.init,this)
        }
        d.prototype.init=function(){
        this.browserStr=Oa.browser.toLowerCase();
        this.browserVersionStr=(""+Oa.browser+"-"+Oa.version).toLowerCase();
        this.osStr=Oa.OS.toLowerCase();
        return $("body").addClass(""+
            this.browserStr+" "+this.browserVersionStr+" "+this.osStr)
        };
        
    d.prototype.isTouch=function(){
        var c;
        return"ipad"===(c=this.osStr)||"iphone"===c||"android"===c
        };
        
    return d
    }())
}
if(C("auth")){
    var z;
    z=new (function(){
        function d(){
            this.check()
            }
            var c,b,e;
        b=c=null;
        e="token"+y.location.port;
        d.prototype.isLoggedIn=function(){
            return"notLoggedIn"!==c
            };
            
        d.prototype.myId=function(){
            return c
            };
            
        d.prototype.myUsername=function(){
            var b;
            return null!=(b=this.me())?b.get("username"):void 0
            };
            
        d.prototype.myToken=function(){
            return b
            };
        d.prototype.me=function(){
            var b;
            b=Models.Member.get(c);
            null==b&&!this.isLoggedIn()&&(b=new ta({
                id:"notLoggedIn",
                notLoggedIn:!0
                }),Models.Member.add(b));
            return b
            };
            
        d.prototype.isMe=function(b){
            return null!=b&&b.id?this.isMe(b.id):b===c
            };
            
        d.prototype.check=function(){
            this.updateToken();
            "undefined"!==typeof rpc&&null!==rpc&&rpc.handleLogin()
            };
            
        d.prototype.updateToken=function(){
            b=$.cookie(e)||"";
            return c=b.split("/")[0]||"notLoggedIn"
            };
            
        d.prototype.consistencyCheck=function(b){
            var c;
            c=!this.isLoggedIn()||
            this.isMe(this.me());
            c||($.cookie(e,null,{
                path:"/"
            }),b.reloadOnError&&y.location.reload());
            return c
            };
            
        return d
        }())
    }
    if(C("keys")){
    var fb,Mb,Nb,Ob,Pb,Qb,ha,na,X,ia,ja,Y,Rb,Kc,Sb,Tb,ka,Lc,Mc,ba,oa,Nc,Ea,Oc,Ub,Pc,Vb,Qc,Wb,Rc,pa,Sc,va,Tc,Uc;
    va=9;
    Ub=10;
    ba=13;
    oa=27;
    Sc=32;
    Mc=46;
    pa=16;
    ka=17;
    na=18;
    Sb=20;
    Y=38;
    ja=39;
    X=40;
    ia=37;
    Wb=63;
    Tb=188;
    Vb=190;
    Ea=191;
    ha=65;
    Rb=ha+1;
    Kc=ha+2;
    Lc=ha+3;
    Nc=ha+5;
    Oc=ha+11;
    Pc=ha+13;
    Qc=ha+16;
    Rc=ha+18;
    Tc=ha+21;
    Uc=ha+23;
    fb=49;
    Mb=50;
    Nb=51;
    Ob=52;
    Pb=53;
    Qb=54
    }
    if(C("util")){
    var m;
    m=_.extend(wb,

    {
        stopPropagation:function(d){
            return d.stopPropagation()
            },
        preventDefault:function(d){
            return d.preventDefault()
            },
        stop:function(d){
            m.stopPropagation(d);
            return m.preventDefault(d)
            },
        securePage:function(){
            return"https:"===document.location.protocol
            },
        formatCount:function(d,c,b){
            if(!d&&!b)return"";
            1!==d&&(c+="s");
            return""+d+" "+c
            },
        spaces:function(d){
            this.longStr||(this.longStr=" ");
            for(;this.longStr.length<d;)this.longStr+=this.longStr;
            return this.longStr.substr(0,d)
            },
        rpad:function(d,c){
            return d.length>c?
            d.substr(0,c):d+this.spaces(c-d.length)
            },
        truncate:function(d,c){
            var b;
            return!(null!=d&&d.length)||d.length<c?d:(b=d.substr(0,d.lastIndexOf(" ",c)))?b:d.substr(0,c)
            },
        scrollToTop:function(){
            return $(y).scrollTop(0)
            },
        isSubmitKey:function(d){
            return null!=d&&(d===ba||d===Ub||m.isSubmitKey(d.keyCode)||m.isSubmitKey(d.which))
            },
        getProtocol:function(d){
            var c,b;
            return!d?"":null!=(c=null!=(b=/^([a-z]+):/i.exec(d))?b[1]:void 0)?c:""
            },
        makeHttp:function(d){
            if(!d)return"";
            d=d.replace(/^[a-z]*:\/*/i,"");
            return"http://"+
            d
            },
        sanitizeWebAddress:function(d){
            var c;
            return"http"!==(c=m.getProtocol(d))&&"https"!==c?m.makeHttp(d):d
            },
        isInPosition:function(d,c,b){
            if(null==(null!=b?b.id:void 0))return!1;
            d=c.models[d];
            return(null!=d?d.id:void 0)===b.id
            },
        calcPos:function(d,c,b,e,f){
            var g;
            if(m.isInPosition(d,c,b))return b.pos;
            c=c.select(function(c){
                return((null!=b?b.id:void 0)!==c.id||f)&&(!e||e(c))
                });
            g=Math.min(Math.max(d,0),c.length);
            d=c[g-1];
            g=c[g];
            c=(null!=b?b.get("pos"):void 0)||-1;
            d=null!=d?d.get("pos"):-1;
            g=null!=g?g.get("pos"):
            -1;
            return-1===g?b&&c>d?c:d+65536:b&&c>d&&c<g?c:0<=d?(g+d)/2:g/2
            },
        isAndroid:function(){
            return/android/i.test(navigator.userAgent)
            },
        pushSupport:function(){
            return!(!y.history||!y.history.pushState||m.isAndroid())
            },
        parseDate:function(d){
            return U.parse(d)
            },
        randomWait:function(d,c){
            return Math.floor(d+Math.random()*c)
            },
        toTitleCase:function(d){
            return d.replace(/\w\S*/g,function(c){
                return c.charAt(0).toUpperCase()+c.substr(1).toLowerCase()
                })
            },
        navMenuList:function(d,c,b){
            var e,f,g,h,j;
            g=d.find(c);
            f=d.find(""+
                c+".selected:first")[0];
            j=_.indexOf(g,f);
            f=g[0];
            h=g[g.length-1];
            h=0>j-1?h:g[j-1];
            g=j+1>g.length?f:g[j+1];
            b===X&&(e=g);
            b===Y&&(e=h);
            return this.selectMenuItem(d,c,e)
            },
        selectMenuItem:function(d,c,b){
            d.find(c).removeClass("selected");
            $(b).addClass("selected");
            if(".list-card"!==c)return d.find(""+c+":not(.active)").find(".app-icon").removeClass("light"),$(b).find(".app-icon").addClass("light")
                },
        insertSelection:function(d,c,b,e){
            var f;
            f=$(d).val();
            b||e?(""===f.substring(e)?$(d).val(""+(f.substring(0,b)+
                c)):$(d).val(""+(f.substring(0,b)+c+f.substring(e))),this.setCaretPosition(d,b+(""+c).length)):($(d).val(""+(f+c)),this.setCaretPosition(d,(""+(f+c)).length));
            return $(d).focus()
            },
        getWordFromCaret:function(d){
            var c,b,e;
            e=$(d).val();
            c=d.selectionStart;
            b=Math.max(e.lastIndexOf("\n",c),e.lastIndexOf(" ",c));
            b+=1;
            d=e.indexOf(" ",c);
            -1===d&&(d=e.length);
            " "===e.charAt(d)&&(b=e.lastIndexOf(" ",c-1)+1);
            c=d-b;
            e=""+e.slice(b,d);
            return{
                start:b,
                end:d,
                length:c,
                str:e
            }
        },
    setCaretPosition:function(d,c){
        var b;
        if(d.setSelectionRange)return d.focus(),
            d.setSelectionRange(c,c);
        if(d.createTextRange)return b=d.createTextRange(),b.collapse(!0),b.moveEnd("character",c),b.moveStart("character",c),b.select()
            },
    setCaretAtEnd:function(d){
        var c;
        if(d)return c=$(d).val().length,this.setCaretPosition(d,c)
            },
    getLastWord:function(d){
        d=$(d).val().split(" ");
        return _.last(d)
        },
    replaceLastWord:function(d,c){
        var b;
        b=RegExp(""+this.getLastWord(d)+"$");
        b=$(d).val().replace(b,"");
        return $(d).val(""+(b+c))
        },
    getMemNameArray:function(d){
        d=Models.Member.get(d);
        return null==
        d?[]:(""+d.get("username").toLowerCase()+" "+d.get("fullName").toLowerCase()+" "+d.get("initials").toLowerCase()).split(" ")
        },
    filterMembers:function(d,c){
        var b,e,f,g,h,j;
        g=RegExp("^"+d.toLowerCase());
        b=[];
        for(h=0,j=c.length;h<j;h++)e=c[h],f=m.getMemNameArray(e),_.detect(f,function(b){
            return g.test(b)
            })&&b.push(e);
        return b
        },
    getNaturalNumber:function(d){
        var c;
        if(d){
            if("1"===d.charAt(d.length-2))return""+d+"th";
            c=d.charAt(d.length-1);
            if("4"===c||"5"===c||"6"===c||"7"===c||"8"===c||"9"===c||"0"===c)return""+
                d+"th";
            if("1"===c)return""+d+"st";
            if("2"===c)return""+d+"nd";
            if("3"===c)return""+d+"rd"
                }
            },
    jqGetActiveElement:function(){
        try{
            return $(document.activeElement)
            }catch(d){
            return $()
            }
        },
getQueryParameter:function(d,c){
    var b,e;
    null==c&&(c="");
    b=null!=(e=RegExp("[?&]"+d+"=([^?&]*)").exec(location.search))?e[1]:void 0;
    return null!=b?decodeURIComponent(b.replace(/\+/g," ")):c
    }
})
}
C("monitor")&&(y.Monitor=function(){
    var d,c,b,e,f;
    d=0;
    b=y.sessionStorage;
    e=null!=(f=null!=b?b.status:void 0)?f:"active";
    return c={
        init:function(){
            setInterval(c.check,
                1E4);
            $(y).focus(function(){
                return c.addActivity()
                });
            $(document).bind("keydown mousedown",function(){
                c.addActivity()
                })
            },
        addActivity:function(){
            d=(new Date).getTime();
            T.set("lastActivity",d);
            c.setStatus("active")
            },
        check:function(){
            3E5<(new Date).getTime()-Math.max(d,T.enabled()?parseInt(T.get("lastActivity")):0)&&c.setStatus("idle")
            },
        setStatus:function(c){
            c!==e&&(e=c,b&&(b.status=e),$(this).triggerHandler("setStatus",e))
            },
        getStatus:function(){
            return e
            }
        }
}(),$(Monitor.init));
if(C("ajaxQueue")){
    var fa,
    i=function(d,c){
        return function(){
            return d.apply(c,arguments)
            }
        },W=[].slice;
fa=new (function(){
    function d(){
        this.ajax=i(this.ajax,this);
        this.hideSending=i(this.hideSending,this);
        this.showSending=i(this.showSending,this);
        this.hideRetrying=i(this.hideRetrying,this);
        this.showRetrying=i(this.showRetrying,this);
        this.hideFail=i(this.hideFail,this);
        this.showOutOfRetries=i(this.showOutOfRetries,this);
        this.showRealError=i(this.showRealError,this);
        this.retryNext=i(this.retryNext,this);
        this.serverAlreadySaw=
        i(this.serverAlreadySaw,this);
        this.retryableError=i(this.retryableError,this);
        this.resetRetries=i(this.resetRetries,this);
        this.success=i(this.success,this);
        this.addToQueue=i(this.addToQueue,this);
        this.removeFromQueue=i(this.removeFromQueue,this);
        this.inQueue=i(this.inQueue,this);
        this.hasQueue=i(this.hasQueue,this);
        this.uniqueReqId=i(this.uniqueReqId,this);
        this._msBackoffMin=this._msBackoff=100;
        this._nTriesMax=this._nTriesLeft=12;
        this._stopped=this._retrying=!1;
        this._maxLength=10;
        this._queue=[];
        this._queueIdSeq=
        0
        }
        d.prototype.uniqueReqId=function(){
        var c;
        return""+(null!=(c=z.me())?c.id:void 0)+"-"+Math.random()
        };
        
    d.prototype.hasQueue=function(){
        return 0<this._queue.length
        };
        
    d.prototype.inQueue=function(c){
        return _.find(this._queue,function(b){
            return b.queueId===c.queueId
            })
        };
        
    d.prototype.removeFromQueue=function(c){
        return this._queue=_.filter(this._queue,function(b){
            return b.queueId!==c.queueId
            })
        };
        
    d.prototype.addToQueue=function(c){
        J("AjaxQueue","addToQueue",c);
        if(this._queue.length+1>this._maxLength)J("AjaxQueue",
            "maxLength exceeded");else return this._queue.push(c),this.showRetrying()
            };
            
    d.prototype.success=function(c){
        J("AjaxQueue","success",c);
        if(this.inQueue(c))return this.removeFromQueue(c),this._retrying=!1,this._msBackoff=this._msBackoffMin,this._nTriesLeft=this._nTriesMax,this.retryNext()
            };
            
    d.prototype.resetRetries=function(){
        J("AjaxQueue","reset");
        this.hideFail();
        this.showRetrying();
        this._retrying=this._stopped=!1;
        this._msBackoff=this._msBackoffMin;
        this._nTriesLeft=this._nTriesMax;
        return this.retryNext()
        };
    d.prototype.retryableError=function(c){
        J("AjaxQueue","retryableError",c);
        fa.inQueue(c)?this._retrying=!1:fa.addToQueue(c);
        return this.retryNext()
        };
        
    d.prototype.serverAlreadySaw=function(c){
        if(this.inQueue(c))return this.removeFromQueue(c),this.retryNext()
            };
            
    d.prototype.retryNext=function(){
        var c;
        if(!this._stopped)if(this.hasQueue()){
            if(this.showRetrying(),!this._retrying){
                this._retrying=!0;
                c=this._queue[0];
                if(0<this._nTriesLeft)return J("AjaxQueue","retrying in "+this._msBackoff+"ms",c),setTimeout(function(){
                    return $.ajax(c)
                    },
                this._msBackoff),this._msBackoff*=2,--this._nTriesLeft;
                this._stopped=!0;
                return this.showOutOfRetries()
                }
            }else this.hideRetrying()
            };
            
d.prototype.showRealError=function(c,b,e){
    J("AjaxQueue","showRealError",e);
    this.hideRetrying();
    return Z.showHtml(t.fill("connect_failed",{
        msg:"Change not saved: failed to sync with the Trello server."
    }),"error","AjaxQueueFail")
    };
    
d.prototype.showOutOfRetries=function(){
    J("AjaxQueue","showOutOfRetries");
    this.hideRetrying();
    return Z.showHtml(t.fill("connect_failed",{
        msg:"Timed out while trying to sync changes with the server.",
        allowReset:!0
        }),"error","AjaxQueueFail")
    };
    
d.prototype.hideFail=function(){
    return Z.hide("AjaxQueueFail")
    };
    
d.prototype.showRetrying=function(){
    return Z.show("Connection interrupted. Retrying "+m.formatCount(this._queue.length,"action",!0)+".","error","AjaxQueueRetry")
    };
    
d.prototype.hideRetrying=function(){
    return Z.hide("AjaxQueueRetry")
    };
    
d.prototype.showSending=function(){
    return Z.show("Sending...","warning","AjaxQueueSending")
    };
    
d.prototype.hideSending=function(){
    return Z.hide("AjaxQueueSending")
    };
d.prototype.ajax=function(c){
    var b;
    if(!this._stopped){
        null==c.timeout&&(c.timeout=2E4);
        c.queueId=this._queueIdSeq++;
        c.headers={
            "X-Trello-ReqId":this.uniqueReqId()
            };
            
        c.oldSuccess=c.success;
        c.oldError=c.error;
        b=!1;
        c.success=function(){
            var c;
            c=1<=arguments.length?W.call(arguments,0):[];
            fa.hideSending();
            b=!0;
            fa.success(this);
            return"function"===typeof this.oldSuccess?this.oldSuccess.apply(this,c):void 0
            };
            
        c.error=function(){
            var e,f;
            e=1<=arguments.length?W.call(arguments,0):[];
            fa.hideSending();
            b=!0;
            if(0===
                (f=e[0].status)||408===f||500===f)return fa.retryableError(this);
            f=function(){
                fa._stopped=!0;
                return fa.showRealError.apply(fa,e)
                };
                
            return null!=this.oldError&&c.interceptErrors?this.oldError.apply(this,W.call(e).concat([f])):f()
            };
            
        if(this.hasQueue())return fa.addToQueue(c);
        $.ajax(c);
        return setTimeout(function(){
            if(!b)return fa.showSending()
                },3E3)
        }
    };

return d
}());
y.ajaxQueueReset=function(){
    return fa.resetRetries()
    }
}
if(C("rpc")){
    var Xb,W=[].slice;
    Xb=function(d,c,b){
        return d.invoke("getModelUpdatesSince",
            [d.modelIxUpdate],function(e){
                var f,g,h,j,l,i,q,m;
                try{
                    q=e.messages;
                    for(l=0,i=q.length;l<i;l++)j=q[l],f=JSON.parse(j),$(d).triggerHandler(f.notify.event,f.notify);
                    m=e.modelIxUpdate;
                    for(g in m)h=m[g],null!=d.modelIxUpdate[g]&&(d.modelIxUpdate[g]=h)
                        }catch(n){
                    return"undefined"!==typeof console&&null!==console&&"function"===typeof console.error&&console.error(["Model sync error on messages:",null!=e?e.messages:void 0]),"undefined"!==typeof console&&null!==console&&"function"===typeof console.error&&console.error(n),
                    "function"===typeof b?b():void 0
                    }
                    "function"===typeof c&&c()
                },function(c){
                null!=(null!=c?c.syncError:void 0)&&"undefined"!==typeof Controller&&null!==Controller?Controller.syncError():"function"===typeof b&&b()
                })
        };
        
    y.SocketRPC=function(){
        var d,c,b,e,f,g,h=this;
        c=this;
        this.fxDefault=function(){};
        
        this.reqid=0;
        this.dictCallback={};
        
        this.dictTime={};
        
        this.connectedOnce=!1;
        this.modelIxUpdate={};
        
        d=this.inUse=!1;
        "undefined"!==typeof z&&null!==z&&"function"===typeof z.myId&&z.myId()&&(d=parseInt(z.myId().substring(0,
            8),16),d=d%100<y.websocketPercent);
        this.transports=[];
        if(!_.include(["iPod","iPhone","iPad"],browserDetect.OS)&&(d||"yes"===T.get("useWebsockets")))this.transports=["websocket"];
        y.dropTheHammer=function(){
            T.set("useWebsockets","yes");
            return"undefined"!==typeof console&&null!==console?"function"===typeof console.log?console.log("Websockets engaged! Reload the page, please. Use pitStop() to turn sockets off."):void 0:void 0
            };
            
        y.pitStop=function(){
            T.set("useWebsockets","no");
            return"undefined"!==typeof console&&
            null!==console?"function"===typeof console.log?console.log("Shutting Websockets down! Reload the page, please. Use dropTheHammer() to turn sockets back on."):void 0:void 0
            };
            
        this.reconnectDelayForStatus=function(b){
            return"active"===b?m.randomWait(100,1E3):m.randomWait(2E3,1E4)
            };
            
        this.bootedDelayForStatus=function(b){
            return"active"===b?m.randomWait(1E4,3E4):m.randomWait(3E4,12E4)
            };
            
        this.socket=io.connect(""+document.location.protocol+"//"+document.location.hostname,{
            transports:this.transports,
            "max reconnection attempts":100,
            "max reconnection delay":32E3,
            "reconnection delay":this.reconnectDelayForStatus(Monitor.getStatus())
            });
        g="connect,reconnect,connecting,reconnecting,disconnect,connect_failed,reconnect_failed,error".split(",");
        b=function(b){
            return h.socket.on(b,function(c){
                return J("rpc","socket event",b,c)
                })
            };
            
        for(e=0,f=g.length;e<f;e++)d=g[e],b(d);
        g=["connecting","reconnecting"];
        b=function(b){
            return h.socket.on(b,function(){
                J("rpc","connecting");
                return $(h).triggerHandler("connecting")
                })
            };
            
        for(e=0,f=g.length;e<f;e++)d=
            g[e],b(d);
        this.socket.on("connect_failed",function(){
            var b;
            J("rpc","connect_failed");
            if(null!=(b=h.socket))if(null!=(b=b.socket))b.reconnecting=!1;
            return $(h).triggerHandler("connect_failed")
            });
        this.socket.on("reconnect_failed",function(){
            J("rpc","reconnect_failed");
            return $(h).triggerHandler("reconnect_failed")
            });
        this.socket.on("connect",function(){
            J("rpc","connect");
            $(h).triggerHandler("connect");
            return h.connectedOnce=!0
            });
        this.socket.on("reconnect",function(){
            J("rpc","reconnect");
            clearTimeout(h.timeoutInvokeResponse);
            delete h.timeoutInvokeResponse;
            return $(h).triggerHandler("reconnect")
            });
        this.socket.on("disconnect",function(b){
            J("rpc","disconnect",b);
            clearTimeout(h.timeoutInvokeResponse);
            delete h.timeoutInvokeResponse;
            if(h.inUse&&"booted"===b)return setTimeout(function(){
                return h.socket.socket.reconnect()
                },h.bootedDelayForStatus(Monitor.getStatus()))
                });
        this.socket.on("error",function(){
            var b,c;
            if(h.connectedOnce&&!(null!=(b=h.socket)&&null!=(c=b.socket)&&c.connected))return $(h).triggerHandler("disconnect")
                });
        this.socket.on("message",function(b){
            var e,f;
            J("rpc","message",b);
            (null!=(null!=b?b.version:void 0)||null!=(null!=b?b.trellisVersion:void 0))&&"undefined"!==typeof Controller&&null!==Controller&&Controller.setServerVersion(b);
            if(b.result){
                if(clearTimeout(c.timeoutInvokeResponse),delete c.timeoutInvokeResponse,"function"===typeof(e=c.dictCallback)[f="fx"+b.reqid])e[f](b.result)
                    }else if(null!=(e=b.notify)&&e.event)null!=b.idModelChannel&&(c.modelIxUpdate[b.idModelChannel]=b.ixLastUpdateChannel),$(c).triggerHandler(b.notify.event,
                b.notify);
            else if(b.error){
                if("function"===typeof(e=c.dictCallback)[f="fxErr"+b.reqid])e[f](b.error)
                    }else c.fxDefault(b);
            b.reqid&&(e=new Date-c.dictTime[b.reqid],J("timing","message",b.reqid,"time",e),delete c.dictCallback["fx"+b.reqid],delete c.dictCallback["fxErr"+b.reqid],delete c.dictTime[b.reqid])
            });
        this.subscribeTo=function(b,c){
            return h.invoke("subscribeTo"+b,[c],function(b){
                return h.modelIxUpdate[c]=b.ixLastUpdate
                },function(b){
                return J("rpc",b)
                })
            };
            
        this.invoke=function(b,c,e,f){
            var d=this;
            this.dictCallback["fx"+this.reqid]=e;
            this.dictCallback["fxErr"+this.reqid]=f;
            this.dictTime[this.reqid]=new Date;
            b={
                sFxn:b,
                rgarg:c,
                reqid:this.reqid++
            };
            
            b.token=z.myToken();
            b=JSON.stringify(b);
            J("rpc","invoke: "+b);
            this.socket.send(b);
            null==this.timeoutInvokeResponse&&(this.timeoutInvokeResponse=setTimeout(function(){
                var b;
                J("rpc","No response from the socket.io server in 10 seconds. Disconnecting.");
                clearTimeout(d.timeoutInvokeResponse);
                delete d.timeoutInvokeResponse;
                return null!=(b=d.socket)?b.disconnect():
                void 0
                },1E4))
            };
            
        this.resync=function(){
            var b,e,f,d,g;
            e=1<=arguments.length?W.call(arguments,0):[];
            f={};
            
            for(d=0,g=e.length;d<g;d++)b=e[d],null!=h.modelIxUpdate[b]&&(f[b]=h.modelIxUpdate[b]);
            c.modelIxUpdate=f;
            return Xb(h)
            };
            
        this.disconnect=function(){
            var b;
            if(!this.secure||"flashsocket"!==(null!=(b=this.getTransport())?b.type:void 0))J("rpc","disconnecting"),this.socket.disconnect()
                };
                
        this.sendStatusConfirm=function(){
            var b,c=this;
            b=function(){
                return c.invoke("setSessionStatus",[Monitor.getStatus()])
                };
            setInterval(b,3E5);
            return b()
            };
            
        this.getTransport=function(){
            var b,c;
            return null!=(b=h.socket)?null!=(c=b.socket)?c.getTransport(h.transports):void 0:void 0
            };
            
        $(Monitor).bind("setStatus",function(b,c){
            var e,f,d;
            return null!=(e=h.socket)?null!=(f=e.socket)?null!=(d=f.options)?d["reconnection delay"]=h.reconnectDelayForStatus(c):void 0:void 0:void 0
            })
        };
        
    y.AJAXRPC=function(){
        var d,c=this;
        d=this;
        this.fxDefault=function(){};
        
        this.idBoardToPoll=null;
        this.modelIxUpdate={};
        
        this.msPoll=2E3;
        this.msPollIdle=1E4;
        this.ajaxSessionId=Math.random().toString().substring(2);
        this.failures=0;
        this.failuresAllowed=1E3;
        this.invoke=function(b,c,f,d){
            b=JSON.stringify({
                sFxn:b,
                rgarg:c,
                reqid:this.reqid++
            });
            return $.ajax({
                url:"/rpc",
                type:"POST",
                data:{
                    msg:b,
                    memberStatus:Monitor.getStatus(),
                    idBoardPolling:this.idBoardToPoll,
                    ajaxSessionId:this.ajaxSessionId
                    },
                dataType:"json",
                success:function(b){
                    null!=(null!=b?b.result:void 0)&&(null==b.result.messages||0<b.result.messages.length)&&J("rpc","message",b.result);
                    (null!=b.version||
                        null!=b.trellisVersion)&&"undefined"!==typeof Controller&&null!==Controller&&Controller.setServerVersion(b);
                    return b.error?"function"===typeof d?d(b.error):void 0:"function"===typeof f?f(b.result):void 0
                    },
                error:function(b,c){
                    return"function"===typeof d?d(c):void 0
                    },
                timeout:2E4
            })
            };
            
        this.subscribeTo=function(b,e){
            var f;
            f="id"+b+"ToPoll";
            c[f]&&delete c[f];
            return c[f]=e
            };
            
        this.poll=function(){
            var b,c,f,g,h,j,l,i;
            if(d.failures===d.failuresAllowed)$(d).triggerHandler("connect_failed");
            else{
                c;
                try{
                    c=z.myId()
                    }catch(q){}
                b=
                function(){
                    setTimeout(function(){
                        d.poll()
                        },z.isLoggedIn()&&"active"===Monitor.getStatus()?d.msPoll:d.msPollIdle)
                    };
                    
                if(null!=d.idBoardToPoll||null!=c||null!=d.idOrganizationToPoll){
                    if(null!=d.idBoardToPoll&&null==(g=d.modelIxUpdate)[l=d.idBoardToPoll])g[l]=-1;
                    if(null!=c&&null==(h=d.modelIxUpdate)[c])h[c]=-1;
                    if(d.idOrganizationToPoll&&null==(j=d.modelIxUpdate)[i=d.idOrganizationToPoll])j[i]=-1;
                    for(f in d.modelIxUpdate)f===d.idBoardToPoll||f===c||f===d.idOrganizationToPoll||(delete d.modelIxUpdate[f],
                        J("rpc","Removing "+f,d.modelIxUpdate));Xb(d,function(){
                        0<d.failures&&$(d).triggerHandler("reconnect");
                        d.failures=0;
                        return b()
                        },function(){
                        $(d).triggerHandler("connecting");
                        ++d.failures;
                        return b()
                        })
                    }else b()
                    }
                }
    };

y.rpc=new function(){
    var d,c,b,e,f,g,h,j,l,i,q=this;
    g=this;
    i=h=j=null;
    e=!1;
    b=[];
    c={};
    
    l=function(){
        var c,f,d,g;
        e=!0;
        j===h&&j.poll();
        g=[];
        for(f=0,d=b.length;f<d;f++)c=b[f],g.push(c());
        return g
        };
        
    d=function(){
        var b,c,e,f,d;
        f="connecting,connect,reconnect,connect_failed,reconnect_failed,updateModels,deleteModels,adminAlert".split(",");
        d=[];
        for(c=0,e=f.length;c<e;c++)b=f[c],d.push($(j).bind(b,function(b,c,e){
            return $(g).triggerHandler(b,c,e)
            }));
        return d
        };
        
    f=function(){
        if(!j){
            y.rpcSocket=i=new SocketRPC;
            j=h=new AJAXRPC;
            d();
            if(i.getTransport()){
                if(i.connectedOnce)return;
                setTimeout(function(){
                    e||(J("rpc","Socket not responsive. Using AJAX."),i.inUse=!1,i.disconnect(),l())
                    },8E3);
                return i.invoke("ping",[],function(){
                    e?i.disconnect():(J("rpc","Socket responded to ping in a timely fashion. Using sockets."),i.inUse=!0,i.sendStatusConfirm(),
                        j=i,d(),l())
                    })
                }
                J("rpc","No socket connect. Using AJAX.");
            return l()
            }
        };
    
this.handleLogin=function(){
    if(z.isLoggedIn())return f()
        };
        
this.invoke=function(b,c,e,d){
    f();
    0===(null!=b?b.indexOf("subscribeTo"):void 0)||0===(null!=b?b.indexOf("setSessionStatus"):void 0)?j.invoke(b,c,e,d):h.invoke(b,c,e,d)
    };
    
this.subscribeTo=function(d,g){
    if((null!=c[d]||null!=g)&&c[d]!==g)f(),e?(c[d]=g,j.subscribeTo(d,g)):(J("rpc","deferring subscribe to "+d+" "+g),b.push(function(){
        q.subscribeTo(d,g)
        }))
    };
    
this.resync=function(){
    var b;
    b=1<=arguments.length?W.call(arguments,0):[];
    f();
    return"function"===typeof j.resync?j.resync.apply(j,b):void 0
    };
    
this.isUsingSocket=function(){
    return null!=j&&j===i
    };
    
$(Monitor).bind("setStatus",function(b,c){
    return q.invoke("setSessionStatus",[c])
    });
z.isLoggedIn()&&f()
};

Backbone.sync=function(d,c,b,e){
    var f,g,h,j;
    if(null!=(g=c.rest)&&g[d]){
        g=!0;
        switch(d){
            case "create":
                if("Board"===(h=c.typeName)||"Member"===h||"Organization"===h)f=function(b){
                c.set(b,{
                    fromServer:!0
                    });
                Models[c.typeName].add(c);
                return Models.finishInit(c)
                };
            break;
            case "update":
                if("Member"===(j=c.typeName)||"Organization"===j)g=!1;
                break;
            case "delete":
                g=!1
                }
                g?c.ready(function(){
            b(c.toJSON())
            }):f=function(e){
            c.set(e,{
                fromServer:!0
                });
            return b(c.toJSON())
            };
            
        f||(f=function(b){
            c.set(b,{
                fromServer:!0
                })
            });
        if(null!=(h=c.rest))h[d](f,e)
            }else"delete"===d?"function"===typeof b&&b():"function"===typeof e&&e("rest api method not implemented")
        }
    }
if(C("format")){
    var ga;
    ga=new (function(){
        function d(){}
        var c,b,e,f,g,h,j;
        c=markdown.Markdown;
        b=c.dialects.Trellis=c.subclassDialect(c.dialects.Gruber);
        e=function(b){
            var c;
            return(c=b.match(m.regexLink))?(b=/^(.*?)([\(\),:.\?]*)$/.exec(c[0]),b=b[1],[b.length,["link",{
                href:b,
                title:b,
                target:"_blank"
            },b]]):[1,b[0]]
            };
            
        j=["http","https","ftp"];
        for(g=0,h=j.length;g<h;g++)f=j[g],b.inline[f+"://"]=e;
        b.inline["@"]=function(b){
            var c,e;
            if(b=/^(@[a-z0-9_]+)(?=$|\W)/i.exec(b))if(c=b[1],e=_.detect(Models.Member.all(),function(b){
                return b.hasAtMe(c)
                }))return b=e.toJSON(),b.atMention=c,b.isMe=z.isMe(e),[c.length,["span",{
                "class":"atMention"+(b.isMe?" me":""),
                title:b.fullName
                },
            c]];
            return[1,"@"]
            };
            
        b.inline["#"]=function(b){
            var c,e,f;
            if(!Controller.onAnyBoardView())return[1,"#"];
            return(e=RegExp("^"+m.regexCardNumber.source).exec(b))?(b=e[0],e=e[1],e=parseInt(e,10),c=Models.Card.find("idShort",e)[0],null!=c?(f=c.get("name"),c=Controller.getCardUrl(c)):(f="Card "+e,c=Controller.getCardUrlWithoutModels(Controller.idBoardCurrent,e,f)),[b.length,["link",{
                href:c,
                title:f
            },"#"+e]]):[1,"#"]
            };
            
        c.buildBlockOrder(b.block);
        c.buildInlinePatterns(b.inline);
        d.prototype.textAsHtml=function(b,
            c){
            var e,f,d;
            if(!b)return b;
            e=_.extend({
                convertNewlines:!1,
                embedlyUrlData:null
            },c);
            d="https:"===location.protocol;
            f=b.replace(/^\s*|\s*$/g,"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/{/g,"&#123;").replace(/}/g,"&#125;");
            e.convertNewlines&&(f="<p>"+f.replace(/\n/g,"</p><p>")+"</p>");
            f=f.replace(/(^|\W)(@[a-z0-9_]+)(?=$|\W)/gi,function(b,c,e){
                var f;
                return(f=_.detect(Models.Member.all(),function(b){
                    return b.hasAtMe(e)
                    }))?(b=
                    f.toJSON(),b.atMention=e,b.isMe=z.isMe(f),c+t.fill("atMention",b)):b
                }).replace(m.regexLink,function(b){
                var c,f,b=b.replace(/&amp;/g,"&"),b=m.cleanLink(b);
                return(c=null!=(f=e.embedlyUrlData)?f[b]:void 0)&&(!d||c.htmlIsHttps||c.htmlHttps||"photo"===c.type&&/^https:\/\//i.test(c.url))?(c.htmlIsHttps&&(c.htmlHttps=c.html),c["type_"+c.type]=!0,c.originalUrl=b,b=t.fill("embedly",_.extend(c,{requireHttps:d})),e.convertNewlines?"</p>"+b+"<p>":b):'<a href="'+b+'" target="_blank">'+b+"</a>"}).replace(RegExp("(^|[\\s>])"+
                m.regexCardNumber.source,"gi"),function(b,c,e){
                return Controller.onAnyBoardView()?(e=parseInt(e,10),e=(b=Models.Card.find("idShort",e)[0])?b.toJSON({
                    url:!0
                    }):{
                    idShort:e,
                    url:Controller.getCardUrlWithoutModels(Controller.idBoardCurrent,e,"Card "+e)
                    },c+t.fill("cardLink",e)):b
                });
            return f=f.replace(/^(<p><\/p>)*|(<p><\/p>)*$/g,"")
            };
            
        d.prototype.markdownAsHtml=function(c){
            return markdown.toHTML(c,b)
            };
            
        d.prototype.bytes=function(b){
            var c,e,f,d,g;
            if(null==b)return"Unknown Size";
            f=["B","KB","MB","GB"];
            c=b;
            for(e=
                d=0,g=f.length;d<g;e=++d){
                b=f[e];
                if(1024>c||e===f.length-1)return f=Math.round(100*c)/100,""+f+" "+b;
                c/=1024
                }
                return"unknown"
            };
            
        return d
        }())
    }
    if(C("viewWithId")){
    var E,D={}.hasOwnProperty,u=function(d,c){
        function b(){
            this.constructor=d
            }
            for(var e in c)D.call(c,e)&&(d[e]=c[e]);b.prototype=c.prototype;
        d.prototype=new b;
        d.__super__=c.prototype;
        return d
        };
        
    E=function(d){
        function c(){
            return c.__super__.constructor.apply(this,arguments)
            }
            u(c,d);
        c.prototype.uniqueId=function(){
            this.hasOwnProperty("_uniqueId")||
            (this._uniqueId=_.uniqueId("view"));
            return this._uniqueId
            };
            
        return c
        }(Backbone.View)
    }
    if(C("viewWithActions")){
    var Pa;
    Pa=function(){
        function d(){}
        d.prototype.limit=50;
        d.prototype.nextPage=1;
        d.prototype.shortLoad=!1;
        d.prototype.loading=!1;
        d.prototype.idModels=null;
        d.prototype.loadMoreActions=function(){
            var c,b=this;
            if(!this.loading)return this.loading=!0,Models.loadMoreActionData(this.model.typeName.toLowerCase(),this.model.id,this.nextPage,this.limit,this.idModels,null!=(c="function"===typeof this.getActionsFilter?
                this.getActionsFilter():void 0)?c:"all",function(c,f){
                b.loading=!1;
                if(!c)return b.shortLoad=f.length<b.limit,0===f.length&&b.renderActions(),++b.nextPage
                    })
            };
            
        d.prototype.hasMoreActions=function(){
            return!this.loading&&!this.shortLoad&&this.getActions().length>=this.limit
            };
            
        d.prototype.getActions=function(){
            return Models.Action.getListForModel(this.model)
            };
            
        return d
        }()
    }
    if(C("editable")){
    var N,i=function(d,c){
        return function(){
            return d.apply(c,arguments)
            }
        },D={}.hasOwnProperty,u=function(d,c){
    function b(){
        this.constructor=
        d
        }
        for(var e in c)D.call(c,e)&&(d[e]=c[e]);b.prototype=c.prototype;
    d.prototype=new b;
    d.__super__=c.prototype;
    return d
    };
    
N=function(d){
    function c(){
        this.clickSetting=i(this.clickSetting,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype._draftKey=function(b){
        return"draft_"+this.model.id+"_"+b
        };
        
    c.prototype._saveDraft=function(b,c){
        return T.set(this._draftKey(b),c)
        };
        
    c.prototype._recallDraft=function(b){
        return T.get(this._draftKey(b))
        };
        
    c.prototype._discardDraft=function(b){
        return T.unset(this._draftKey(b))
        };
    c.prototype.editField=function(b){
        if(!($(b.target).is("a")&&"#"!==$(b.target).attr("href")||DragSort.dragging||DragSort.sorting))return m.stop(b),v.hide(),b=$(b.target).closest(".editable"),this.edit(b.attr("attr"))
            };
            
    c.prototype.edit=function(b){
        var c,f,d,h,j,i;
        c=this.$(this.el).find("[attr="+b+"]");
        d=this.$(this.el).find(".no-edits [attr="+b+"]");
        c=c.not(d);
        0!==c.length&&(R.cancelEdits(),d=c.find(".edit:first"),0!==d.length&&(h=c.find(".field:first"),i=h.is("textarea"),j=h.parent().is(".card-detail-edit"),
            f=c.find(".current"),i&&(f=j?Math.max(126,f.height()+20):Math.max(36,f.height()+20),500<f&&(f=500),h.height(f)),d.append(t.edit_controls),d.hasClass("delete")||d.find(".delete").remove(),d.hasClass("convert")||d.find(".convert").remove(),c.addClass("editing"),""===h.val()&&h.val(this.model.get(b)),h.data("draftKey",this._draftKey(b)),J("editable",this.model),h.focus().select()))
        };
        
    c.prototype.recallDrafts=function(){
        var b,c,f;
        f=this;
        b=this.$(this.el).find("[attr]");
        c=this.$(this.el).find(".no-edits [attr]");
        return b.not(c).each(function(){
            var b,c,e=this;
            b=$(this).attr("attr");
            c=f._recallDraft(b);
            if(null!=c)return b=$(this).find(".field:first"),b.val(c),_.defer(function(){
                return $(e).find(".edits-warning").show()
                })
            })
        };
        
    c.prototype.stopEditing=function(b){
        m.stop(b);
        R.cancelEdits();
        return!1
        };
        
    c.prototype.clearEdits=function(b){
        var c;
        m.stop(b);
        b=$(b.target).closest(".editable[attr]");
        c=b.attr("attr");
        null!=c&&this._discardDraft(c);
        b.find(".field").val("");
        b.find(".edits-warning").hide();
        R.cancelEdits();
        return!1
        };
    c.prototype.validate=function(){
        var b,c,f,d;
        d=$(this.el).find(".editing.non-empty .field");
        for(c=0,f=d.length;c<f;c++)if(b=d[c],/^\s*$/.test($(b).val()))return!1;return!0
        };
        
    c.prototype.commitEdits=function(b){
        var c,f;
        if("keypress"!==b.type||m.isSubmitKey(b)&&b.ctrlKey||13===b.keyCode&&(!$(b.target).is("textarea")||$(b.currentTarget).hasClass("single-line")))if(m.stop(b),this.validate())return c=this.model,f=this,_.defer(function(){
            var d;
            d=$(b.target).closest(".editable.editing[attr]");
            d.remove("input[type=submit]");
            d.removeClass("editing").each(function(){
                var b,d,g,i;
                b=$(this).attr("attr");
                g=$(this).find(".field").val();
                0===jQuery.trim(g).length&&(g="");
                f._discardDraft(b);
                i={};
                
                d="function"===typeof f.customSet?f.customSet(b,g):void 0;
                d||(i[b]=g,b=$(this).find(".current"),b.hasClass("markeddown")?b.html(ga.markdownAsHtml(null!=g?g:"")):b.hasClass("js-text-as-html")?b.html(ga.textAsHtml(null!=g?g:"",{
                    convertNewlines:!0
                    })):b.text(g),J("editable","*** Set Data: "),J("editable",i),J("editable",c));
                return c.save(i,

                {
                    silent:d
                })
                }).find(".field").val("");
            return d.find(".edits-warning").hide()
            }),!0
        };
        
    c.prototype.stopPropagation=function(b){
        m.stopPropagation(b)
        };
        
    c.prototype.clickSetting=function(b){
        var c,f,d;
        c=$(b.target);
        if(!c.hasClass("disabled")&&!c.closest(".js-disabled").length&&(f=c.attr("href"),!(f&&"#"!==f)&&(f=c.closest(".pref").attr("name"))))d=c.attr("value"),d=function(){
            switch(d){
                case "true":
                    return!0;
                case "false":
                    return!1;
                default:
                    return d
                    }
                }(),this.model.setPref(f,d),this.model.save(),m.stop(b)
        };
        
c.prototype.delegateEvents=
function(b){
    var e;
    e={
        "click .current":"editField",
        "click .js-cancel-edit":"clearEdits",
        "click .js-discard-edits":"clearEdits",
        "click .js-view-edits":"editField",
        "click .js-save-edit":"commitEdits",
        "keypress .field":"commitEdits",
        "click input":"stopPropagation",
        "click textarea":"stopPropagation"
    };
    
    null!=this.model.setPref&&(e["click a"]="clickSetting");
    return c.__super__.delegateEvents.call(this,_.extend(e,b||this.events))
    };
    
return c
}(E)
}
C("tabbed")&&(D={}.hasOwnProperty,u=function(d,c){
    function b(){
        this.constructor=
        d
        }
        for(var e in c)D.call(c,e)&&(d[e]=c[e]);b.prototype=c.prototype;
    d.prototype=new b;
    d.__super__=c.prototype;
    return d
    },function(d){
    function c(){
        c.__super__.constructor.apply(this,arguments);
        this.options.section?this.currentTab=this._findTab(this.options.section):this.tabs.length&&(this.currentTab=this.tabs[0]);
        this.reset()
        }
        u(c,d);
    c.prototype.tabs=[];
    c.prototype.reset=function(){
        return this._dataIsLoaded={}
    };
    
c.prototype._findTab=function(b){
    return _.detect(this.tabs,function(c){
        return c.id===b
        })
    };
    
c.prototype._getCurrentView=
function(){
    return this.currentTab?this.model.getView(this.currentTab.viewClass,this.currentTab.id,this.currentTab.viewOptions):null
    };
    
c.prototype.renderCurrentTab=function(){
    var b,c;
    this.currentTab&&(b=this._getCurrentView(),b.render(),"function"===typeof(c=this.currentTab).fxInitView&&c.fxInitView(b),b=b.el,$(this.el).find(".js-tabbed-content:first").empty().append(b),$(this.el).find(".js-tab").removeClass("active"),$(this.el).find(".js-tab[tabName='"+this.currentTab.id+"']").addClass("active"));
    return this
    };
    
c.prototype.setCurrentTab=function(b){
    var c;
    this.currentTab=this._findTab(b);
    this._dataIsLoaded[b]||(this._dataIsLoaded[b]=!0,null!=(c=this._getCurrentView())&&"function"===typeof c.refreshData&&c.refreshData());
    return this.renderCurrentTab()
    };
    
c.prototype.switchTab=function(b){
    m.stop(b);
    b=$(b.target).attr("tabName");
    R.cancelEdits();
    m.scrollToTop();
    $(".window-overlay").scrollTop("0");
    R.calc_surface();
    return this.setCurrentTab(b)
    };
    
c.prototype.delegateEvents=function(b){
    return c.__super__.delegateEvents.call(this,
        _.extend({
            "click .js-tab":"switchTab"
        },b||this.events))
    };
    
return c
}(N));
if(C("header")){
    var Vc,Wc,Xc,Yc,i=function(d,c){
        return function(){
            return d.apply(c,arguments)
            }
        },D={}.hasOwnProperty,u=function(d,c){
    function b(){
        this.constructor=d
        }
        for(var e in c)D.call(c,e)&&(d[e]=c[e]);b.prototype=c.prototype;
    d.prototype=new b;
    d.__super__=c.prototype;
    return d
    };
    
Xc=function(d){
    function c(){
        this.viewMemberMenu=i(this.viewMemberMenu,this);
        this.viewBoardsMenu=i(this.viewBoardsMenu,this);
        this.updateBoardsMenuActivityCounts=
        i(this.updateBoardsMenuActivityCounts,this);
        this.viewNotificationsMenu=i(this.viewNotificationsMenu,this);
        this.renderUnreadNotifications=i(this.renderUnreadNotifications,this);
        this.renderAvatar=i(this.renderAvatar,this);
        this.renderUpgradeAvailable=i(this.renderUpgradeAvailable,this);
        this.initialize=i(this.initialize,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.className="header-user";
    c.prototype.initialize=function(){
        Models.Notification.bind("add",this.renderUnreadNotifications);
        Models.Notification.bind("change",this.renderUnreadNotifications);
        Models.Notification.bind("remove",this.renderUnreadNotifications);
        this.model.bindEventsDebounced(this.renderAvatar,"change:initials","change:avatarHash","change:avatarSource","change:fullName","change:username");
        $(Controller).bind("change:serverVersion",this.renderUpgradeAvailable);
        this.updateBoardsMenuActivityCounts=_.debounce(this.updateBoardsMenuActivityCounts,1E3,!0);
        return c.__super__.initialize.apply(this,arguments)
        };
        
    c.prototype.events=

    {
        "click .js-open-header-notifications-menu":"viewNotificationsMenu",
        "click .js-open-header-boards-menu":"viewBoardsMenu",
        "mouseover .js-open-header-boards-menu":"updateBoardsMenuActivityCounts",
        "click .js-open-header-member-menu":"viewMemberMenu",
        "click .js-toggle-login-popover":"viewLoginMenu"
    };
    
    c.prototype.render=function(){
        J("render","rendering header");
        $(this.el).html(t.fill("user_header"));
        this.renderUpgradeAvailable();
        this.renderUnreadNotifications();
        this.renderAvatar();
        return this
        };
        
    c.prototype.renderUpgradeAvailable=
    function(){
        J("render","rendering upgrade available");
        if(Controller.advertiseUpgrade())return $(this.el).find(".upgrade").show()
            };
            
    c.prototype.renderAvatar=function(){
        J("render","rendering avatar");
        return $(this.el).find(".member").html(t.fill("member",this.model.toJSON()))
        };
        
    c.prototype.renderUnreadNotifications=function(){
        var b,c,f,d,h;
        d=Models.Notification.all();
        h=[];
        for(c=0,f=d.length;c<f;c++)b=d[c],b.get("unread")&&h.push(b);
        b=h.length;
        c="";
        0<b&&(c=b);
        $(this.el).find(".js-unread-note-count").html(c);
        Controller.setLocation({
            unreadCount:b
        })
        };
        
    c.prototype.viewLoginMenu=function(b){
        m.stop(b);
        n("Header","Login Menu","Open Login Menu");
        return v.toggle({
            elem:$(b.target).closest(".js-toggle-login-popover")[0],
            top:37,
            view:z.me().getView(Yc)
            })
        };
        
    c.prototype.viewNotificationsMenu=function(b){
        m.stop(b);
        n("Header","Notifications Menu","Open Notifications Menu");
        b=this.model.getView(Zc);
        v.toggle({
            elem:$(this.el).find(".js-open-header-notifications-menu")[0],
            top:37,
            view:b,
            hidden:b.markUnread
            })
        };
        
    c.prototype.updateBoardsMenuActivityCounts=
    function(b){
        m.stop(b);
        return this.model.getView(Yb).getActivityCounts()
        };
        
    c.prototype.viewBoardsMenu=function(b){
        m.stop(b);
        n("Header","Boards Menu","Open Boards Menu");
        this.updateBoardsMenuActivityCounts(b);
        v.toggle({
            elem:$(this.el).find(".js-open-header-boards-menu")[0],
            top:37,
            view:this.model.getView(Yb)
            })
        };
        
    c.prototype.viewMemberMenu=function(b){
        m.stop(b);
        n("Header","User Menu","Open User Menu");
        b=z.me().getView(Wc);
        v.toggle({
            elem:$(this.el).find(".js-open-header-member-menu")[0],
            top:37,
            view:b
        })
        };
    return c
    }(E);
Yc=function(d){
    function c(){
        this.loginGoogle=i(this.loginGoogle,this);
        this.loginPassword=i(this.loginPassword,this);
        this.render=i(this.render,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.getViewTitle=function(){
        return"Log In"
        };
        
    c.prototype.className="login-popover";
    c.prototype.initialize=function(){
        return this.errors={}
    };
    
c.prototype.events={
    "click .js-password-login":"loginPassword",
    "click .js-google-login":"loginGoogle"
};

c.prototype.render=function(){
    $(this.el).html(t.fill("login_popover",

    {
        badLogin:this.errors.badLogin
        }));
    return this
    };
    
c.prototype.loginPassword=function(b){
    var c=this;
    m.stop(b);
    n("Header","Log In","Email / Password");
    b=$(b.target).closest("form");
    b={
        user:b.find('input[name="user"]').val(),
        password:b.find('input[name="password"]').val()
        };
        
    return $c.api.login(b,{
        requireAjax:!0
        },function(b){
        z.check(b);
        y.navigate(null,{
            forceReload:!0
            })
        },function(){
        c.errors.badLogin=!0;
        c.render()
        })
    };
    
c.prototype.loginGoogle=function(b){
    m.stop(b);
    n("Header","Log In","Google");
    b=$(b.target).closest("form");
    b.find('input[name="mode"]').val("popup");
    b.find('input[name="immediate"]').val(!1);
    b.find('input[name="returnUrl"]').val(document.location.pathname);
    return b.submit()
    };
    
return c
}(E);
Vc=function(d){
    function c(){
        this.renderUnreadAnnouncementCount=i(this.renderUnreadAnnouncementCount,this);
        this.render=i(this.render,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.initialize=function(){
        var b=this;
        ea.onAddRemove(this.renderUnreadAnnouncementCount);
        ea.bind("change:unread",this.renderUnreadAnnouncementCount);
        Ca.onAddRemove(this.render);
        this.updateAllAnnouncements=_.debounce(this.updateAllAnnouncements,6E4,!0);
        return setInterval(function(){
            return b.renderUnreadAnnouncementCount()
            },3E4)
        };
        
    c.prototype.events={
        click:"openMenu",
        mouseover:"updateAllAnnouncements"
    };
    
    c.prototype.render=function(){
        $(this.el).html(t.fill("header_info_button"));
        this.renderUnreadAnnouncementCount();
        return this
        };
        
    c.prototype.openMenu=function(b){
        var c;
        m.stop(b);
        n("Header","(i)","Open Reference Menu");
        c=z.me().getView(ad);
        v.toggle({
            elem:$(b.target).closest(".header-about")[0],
            top:37,
            view:c,
            hidden:function(){
                var b;
                return null!=(b=ea.top())?b.markRead():void 0
                }
            })
    };
    
c.prototype.renderUnreadAnnouncementCount=function(){
    var b,c;
    c=ea.unreadCount();
    b=$(this.el).find(".js-unread-announcements");
    z.isLoggedIn()&&0<c?b.text(c).show():b.empty().hide()
    };
    
c.prototype.updateAllAnnouncements=function(){
    return Ca.fetch()
    };
    
return c
}(N);
Wc=function(d){
    function c(){
        this.logout=i(this.logout,this);
        this.account=i(this.account,this);
        this.notifications=i(this.notifications,this);
        this.profile=i(this.profile,
            this);
        this.boards=i(this.boards,this);
        this.render=i(this.render,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.getViewTitle=function(){
        var b;
        b=z.me().get("username");
        return""+z.me().get("fullName")+" ("+b+")"
        };
        
    c.prototype.events={
        "click .js-boards":"boards",
        "click .js-profile":"profile",
        "click .js-notifications":"notifications",
        "click .js-account":"account",
        "click .js-logout":"logout"
    };
    
    c.prototype.render=function(){
        J("render","rendering HeaderMemberMenuView");
        $(this.el).html(t.fill("menu",

        {
            menu_cards:[{
                name:"Boards",
                js_class:"js-boards",
                url:Controller.getMemberBoardsUrl()
                },{
                name:"Profile",
                js_class:"js-profile",
                url:Controller.getMemberProfileUrl()
                },{
                name:"Notifications",
                js_class:"js-notifications",
                url:Controller.getMemberNotificationsUrl()
                },{
                name:"Account...",
                js_class:"js-account"
            },{
                name:"Log Out",
                js_class:"js-logout",
                url:"/logout"
            }]
            }));
        return this
        };
        
    c.prototype.boards=function(){
        return n("Header","User Menu","Boards")
        };
        
    c.prototype.profile=function(){
        return n("Header","User Menu","Profile")
        };
    c.prototype.notifications=function(){
        return n("Header","User Menu","Notifications")
        };
        
    c.prototype.account=function(){
        var b;
        n("Header","User Menu","Account");
        b=z.me().getView(bd);
        return v.pushView({
            view:b
        })
        };
        
    c.prototype.logout=function(){
        return n("Header","User Menu","Log Out")
        };
        
    return c
    }(E)
}
if(C("archive")){
    var cd,Zb,gb,i=function(d,c){
        return function(){
            return d.apply(c,arguments)
            }
        },D={}.hasOwnProperty,u=function(d,c){
    function b(){
        this.constructor=d
        }
        for(var e in c)D.call(c,e)&&(d[e]=c[e]);b.prototype=
    c.prototype;
    d.prototype=new b;
    d.__super__=c.prototype;
    return d
    };
    
cd=function(d){
    function c(){
        this.render=i(this.render,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.events={};
    
    c.prototype.initialize=function(){
        return this.getList().bind("change:closed",this.render).onAddRemove(this.render)
        };
        
    c.prototype.render=function(){
        var b,c,f=this;
        c=this.getList();
        this.sortVal&&(c=c.sortBy(this.sortVal));
        $(this.el).html(t.fill("archive",{
            name:this.getTitle(),
            empty:0===c.filter(function(b){
                return b.get("closed")
                }).length,
            emptyMessage:this.getEmptyMessage()
            }));
        b=$(this.el).find(".archive-items");
        c.forEach(function(c){
            if(c.get("closed"))return c=c.getView(gb,null,{
                onReopen:f.onReopen
                }),b.append(c.render().el)
                });
        return this
        };
        
    c.prototype.close=function(){};
    
    return c
    }(E);
gb=function(d){
    function c(){
        this.deleteModel=i(this.deleteModel,this);
        this.reopen=i(this.reopen,this);
        this.render=i(this.render,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.tagName="li";
    c.prototype.events={
        "click .js-reopen":"reopen",
        "click .js-delete":"deleteModel"
    };
    
    c.prototype.render=function(){
        var b,c,f,d,h;
        b=null!=this.model.owned?this.model.owned():this.model.editable();
        c=this.model.toJSON();
        c.reOpenText=null!=(d=this.options.reOpenText)?d:"Re-open";
        c.canDelete=null!=(h=this.options.canDelete)?h:!1;
        c.url="function"===typeof(f=this.model).getUrl?f.getUrl():void 0;
        $(this.el).html(t.fill("archive_item",c,{
            editable:b
        }));
        return this
        };
        
    c.prototype.reopen=function(b){
        m.preventDefault(b);
        this.model.reopen();
        n(this.model.typeName,
            "Reopen");
        if("function"===typeof(b=this.options).onReopen)b.onReopen(this.model);
        return!1
        };
        
    c.prototype.deleteModel=function(b){
        m.preventDefault(b);
        n(this.model.typeName,"Delete");
        this.model.destroy();
        return!1
        };
        
    return c
    }(E);
Zb=function(d){
    function c(){
        this.openCard=i(this.openCard,this);
        this.render=i(this.render,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.tagName="div";
    c.prototype.className="archived-list-card";
    c.prototype.events={
        "click .list-card":"openCard",
        "click .js-reopen":"reopen",
        "click .js-delete":"deleteModel"
    };
    
    c.prototype.render=function(){
        var b,c,f,d,h,j;
        b=null!=this.model.owned?this.model.owned():this.model.editable();
        c=this.model.toJSON();
        c.labels=this.model.getLabels();
        c.reOpenText=null!=(h=this.options.reOpenText)?h:"Re-open";
        c.canDelete=null!=(j=this.options.canDelete)?j:!1;
        c.url="function"===typeof(d=this.model).getUrl?d.getUrl():void 0;
        $(this.el).html("<div class='list-card clearfix'>        "+t.fill("card_in_list",c,{
            editable:b
        })+"      </div>      "+t.fill("archived_card_options",
            c,{
                editable:b
            }));
        d=this.model.memberList.models;
        b=$(this.el).find(".list-card-members");
        for(h=0,j=d.length;h<j;h++)c=d[h],b.append("<div class='member'>          "+t.fill("member",c.toJSON())+"        </div>");
        f=$(this.el).find(".badges");
        this.model.badgeList.forEach(function(b){
            b.get("isArchived")||(b=b.getView(Qa,"card"),f.append(b.render().el))
            });
        return this
        };
        
    c.prototype.openCard=function(b){
        m.stop(b);
        y.navigate(Controller.getCardUrl(this.model));
        F.calcPos()
        };
        
    return c
    }(gb)
}
C("templates")&&$(function(){
    var d;
    d=function(c){
        var b,e,f,d;
        b=t;
        d=c.split(".");
        for(e=0,f=d.length;e<f;e++)c=d[e],b=b[c];
        return _.isString(b)?b:b.index
        };
        
    t.fill=function(c,b,e,f){
        null==b&&(b={});
        null==e&&(e={});
        null==f&&(f={});
        c=d(c);
        b=_.extend({
            __ed:null!=e?e.editable:void 0,
            __own:null!=e?e.owned:void 0,
            __invited:null!=e?e.invited:void 0,
            __loggedIn:z.isLoggedIn(),
            __avatarDomain:"https://trello-avatars.s3.amazonaws.com"
        },b,ABTest.templateData(c,e.idABTest));
        return Fe.to_html(c,b,f)
        };
        
    return t.fillMenu=function(c,b,e){
        return t.fill("menu-base",

        {
            content:t.fill(c,b,e)
            })
        }
    });
C("abTest")&&(D={}.hasOwnProperty,u=function(d,c){
    function b(){
        this.constructor=d
        }
        for(var e in c)D.call(c,e)&&(d[e]=c[e]);b.prototype=c.prototype;
    d.prototype=new b;
    d.__super__=c.prototype;
    return d
    },y.ABTest=new (function(d){
    function c(){
        this._id=null
        }
        u(c,d);
    c.prototype.getDefaultId=function(){
        var b,c;
        b=this._id;
        z.isLoggedIn()&&this._id!==z.myId()&&(this._id=z.myId());
        null==this._id&&(this._id=null!=(c=$.cookie("ab"))?c:this._hasher(""+Math.random()).substr(0,16));
        b!==this._id&&
        $.cookie("ab",this._id,{
            path:"/",
            expires:60
        });
        return this._id
        };
        
    c.prototype.event=function(b,c){
        null==c&&(c=this.getDefaultId());
        return $.post("/ab",{
            id:c,
            event:b
        })
        };
        
    return c
    }(Jb)));
if(C("api")){
    var ua,$c,W=[].slice;
    (function(){
        var d;
        d={
            quickOp:function(c,b,e,f){
                var d;
                if(c&&b)return d={},m.isSimpleObject(b)?(d=b,f=e):d[b]=e,b={},b[c]=d,this.update(b,f),this
                    },
            set:function(c,b,e){
                return this.quickOp("set",c,b,e)
                },
            pull:function(c,b,e){
                return this.quickOp("pull",c,b,e)
                },
            push:function(c,b,e){
                return this.quickOp("push",
                    c,b,e)
                },
            addToSet:function(c,b,e){
                return this.quickOp("addToSet",c,b,e)
                },
            updates:null,
            update:function(c,b){
                var e,f,d,h,j,i,o,q,A,n,s,t,v,B;
                if(!c)return this;
                e=_.clone(c);
                null==b&&(b={});
                v=["set","push","pull","addToSet"];
                for(A=0,s=v.length;A<s;A++)if(o=v[A],e[o]){
                    e[o]=_.clone(e[o]);
                    B=e[o];
                    for(i in B){
                        q=B[i];
                        f=this.get(i);
                        h=!1;
                        if("set"===o)if(m.isSimpleObject(q)&&m.isSimpleObject(f)&&(q=_.extend({},f,q)),_.isEqual(f,q)||!f&&!q)h=!0;
                            else if(_.isArray(f)&&_.isArray(q)&&f.length===q.length){
                            h=!0;
                            for(d=
                                n=0,t=f.length;n<t;d=++n)j=f[d],h=h&&_.isEqual(j,q[d])
                                }else h=!1;
                        else if(d=_.contains(f,q),("push"===o||"addToSet"===o)&&d||"pull"===o&&!d)h=!0;
                        if(h)delete e[o][i];
                        else{
                            h={};
                            
                            "set"!==o&&!_.isArray(f)&&(f=[]);
                            h[i]=function(){
                                switch(o){
                                    case "set":
                                        return q;
                                    case "push":
                                        return f.concat(q);
                                    case "pull":
                                        return _.without(f,q);
                                    case "addToSet":
                                        return _.uniq(f.concat(q))
                                        }
                                    }();
                        if(!b.waitForServer&&!Backbone.Model.prototype.set.call(this,h,b))return!1;
                        ("id"===i||"dateLastActivity"===i||"nWatchers"===i||"status"===
                            i||_.isArray(q))&&delete e[o][i]
                    }
                    }
                    _.isEmpty(e[o])&&delete e[o]
            }!b.silent&&!b.fromServer&&!_.isEmpty(e)&&(null==this.updates&&(this.updates=[]),this.updates.push(e));
        return this
        }
    };
    
return y.Api=_.extend(y.Api,{
    getFx:function(c,b){
        return function(e,f,d,h){
            _.isFunction(f)&&(h=d,d=f,f={});
            null==f&&(f={});
            e={
                token:z.myToken(),
                method:b,
                data:e
            };
            
            f="/api/"+c.typeName.toLowerCase();
            c.id&&(f+="/"+c.id);
            fa.ajax({
                url:f,
                data:JSON.stringify(e),
                type:"post",
                contentType:"application/json",
                dataType:"json",
                success:function(b){
                    y.Api.inFailure&&
                    (y.Api.inFailure=!1,$(y.Api).triggerHandler("reconnect"));
                    return b.error?"function"===typeof h?h(b.error):void 0:"function"===typeof d?d(b):void 0
                    },
                error:function(){
                    var b;
                    b=1<=arguments.length?W.call(arguments,0):[];
                    y.Api.inFailure=!0;
                    $(y.Api).triggerHandler("connecting");
                    return"function"===typeof h?h.apply(null,b):void 0
                    }
                })
        }
    },
init:function(c){
    var b,e,f,g,h;
    b={};
    
    h=this.methodMap[c.typeName];
    for(f=0,g=h.length;f<g;f++)e=h[f],b[e]=this.getFx(c,e);
    c.api=b;
    c.rest={};
    
    b.update&&(_.extend(c,d),c.rest.update=
        _.bind(function(b,c){
            var e=this;
            this.updates?this.withIdParents(function(f){
                f={
                    updates:e.updates,
                    idParents:f
                };
                
                e.updates=null;
                return e.api.update(f,b,c)
                }):b({})
            },c));
    b.create&&(c.rest.create=_.bind(function(b,c){
        var e=this;
        return this.withIdParents(function(f){
            f={
                attrs:e.toJSON(),
                idParents:f
            };
            
            e.api.create(f,b,c)
            })
        },c));
    b["delete"]&&(c.rest["delete"]=_.bind(function(b,c){
        var e=this;
        return this.withIdParents(function(f){
            f={
                attrs:e.toJSON(),
                idParents:f
            };
            
            e.api["delete"](f,b,c)
            })
        },c));
    return c
    }
})
})();
$c=
Api.init({
    typeName:"App"
});
ua=function(d){
    null==d.data&&(d.data={});
    d.data.token=z.myToken();
    return fa.ajax(d)
    }
}
if(C("models")){
    var wa,Fa,$b,la,aa=[].indexOf||function(d){
        for(var c=0,b=this.length;c<b;c++)if(c in this&&this[c]===d)return c;return-1
        },W=[].slice,D={}.hasOwnProperty,u=function(d,c){
        function b(){
            this.constructor=d
            }
            for(var e in c)D.call(c,e)&&(d[e]=c[e]);b.prototype=c.prototype;
        d.prototype=new b;
        d.__super__=c.prototype;
        return d
        },i=function(d,c){
        return function(){
            return d.apply(c,arguments)
            }
        };
y.Models=function(){
    var d,c,b,e,f,g,h,j,i,o,q,n,t,s,v,u;
    g={};
    
    f={};
    
    h="Member,Board,Organization,Notification,Action,Card,List".split(",");
    e=function(){
        var b,c,e,d,j,i;
        "undefined"!==typeof ea&&null!==ea&&ea.unbind();
        "undefined"!==typeof Ca&&null!==Ca&&Ca.unbind();
        for(e=0,d=h.length;e<d;e++)b=h[e],"undefined"!==typeof Models&&null!==Models&&Models[b].unbind();
        for(c in f){
            e=f[c];
            for(b=j=0,i=e.length;j<i;b=++j)d=e[b],J("models","deleting",d),"function"===typeof d.destructor&&d.destructor(),delete e[b]
        }
        g=

        {
            members:{},
            boards:{},
            organizations:{},
            notifications:{},
            cards:{},
            actions:{},
            lists:{}
    };
    
    f={
        members:[],
        boards:[],
        organizations:[],
        notifications:[],
        cards:[],
        actions:[],
        lists:[]
    };
    
    return y.map=g
    };
    
e();
b=function(b){
    b.postInitialized||("function"===typeof b.postInitialize&&b.postInitialize(),b.postInitialized=!0);
    return b
    };
    
d=function(b,e){
    return q(c(b,e))
    };
    
q=function(c){
    var e,f,d,g,h;
    e=function(c){
        var e,f,d,g;
        g=[];
        for(f=0,d=c.length;f<d;f++)e=c[f],g.push(b(e));
        return g
        };
        
    f=["member","organization","board",
    "list"];
    for(g=0,h=f.length;g<h;g++)d=f[g],null!=c[d]&&e(c[d]);
    for(d in c)_.contains(f,d)||e(c[d])
        };
        
c=function(b,e,f){
    var d,g,h,j,i,l,o,q,s,n;
    null==f&&(f={});
    d=function(b){
        var c,e,d,g;
        g=[];
        for(c in b)e=b[c],g.push(f[c]=(null!=(d=f[c])?d:[]).concat(e));return g
        };
        
    if(_.isArray(e))for(h=0,q=e.length;h<q;h++)l=e[h],d(c(b,l));
    else{
        h={
            action:Ra,
            card:xa,
            board:xb,
            list:ac,
            member:ta,
            notification:bc,
            organization:Sa
        };
        
        j=["memberships","memberType"];
        q=_.clone(e);
        for(g in h){
            o=[];
            for(i in e)l=e[i],RegExp("^"+g).test(i)&&
                0>aa.call(j,i)&&(_.isNumber(l)?q[""+g+"Count"]=l:_.isArray(l)?o=o.concat(l):o.push(l),delete q[i]);for(s=0,n=o.length;s<n;s++)l=o[s],d(c(g,l))
                }
                d=Models[m.capitalize(b)];
        null!=d&&(e=d.get(e.id),null!=e?e.set(q,{
            fromServer:!0
            }):(e=new h[b](q),null==f[b]&&(f[b]=[]),f[b].push(e),d.add(e)))
        }
        return f
    };
    
j={
    _loadMultiApiData:function(b){
        return async.map(b,function(b,c){
            var e,f,d,g,h,j,i,l,o;
            j=b.modelType;
            d=b.id;
            l=b.query;
            i=b.path;
            e=b.next;
            g=[];
            for(h=/invite-token-[-a-f0-9]*/g;null!=(f=null!=(o=h.exec(document.cookie))?
                o[0]:void 0);)g.push($.cookie(f));
            _.isEmpty(g)||(l.invitationTokens=g.join(","));
            null==i&&(i=""+m.pluralize(j)+"/"+d);
            return QuickLoad("/1/"+i+"?"+$.param(l),function(b,f,d){
                c(null,{
                    modelType:j,
                    data:b,
                    next:e
                });
                if(null!=(b=null!=d?d.getResponseHeader("X-Server-Time"):void 0))return Ta.updateServerTime(parseInt(b))
                    },function(b){
                return 0===b.indexOf("invalid token")?y.location="/logout":c("Api load error on "+j+", "+d+", "+l+": "+b)
                })
            },function(e,f){
            var d,g,h,j;
            if(e)for(g=0,h=b.length;g<h;g++)d=b[g],
                "function"===typeof d.next&&d.next(e);
            else{
                d=_.reduce(f,function(b,e){
                    var f,d;
                    d=e.modelType;
                    f=e.data;
                    return c(d,f,b)
                    },{});
                q(d);
                j=[];
                for(g=0,h=f.length;g<h;g++)d=f[g],j.push("function"===typeof d.next?d.next(null,d.data):void 0);
                return j
                }
            })
    },
_loadApiData:function(){
    var b,c,e,f,d,g;
    c=arguments[0];
    b=arguments[1];
    f=arguments[2];
    d=5<=arguments.length?W.call(arguments,3,g=arguments.length-1):(g=3,[]);
    e=arguments[g++];
    return this._loadMultiApiData([{
        modelType:c,
        id:b,
        query:f,
        path:d[0],
        next:e
    }])
    },
_loadApiDataAndHeader:function(){
    var b,
    c,f,d,g,h,j,i;
    b=2<=arguments.length?W.call(arguments,0,d=arguments.length-1):(d=0,[]);
    h=arguments[d++];
    g=b[0];
    d=b[1];
    i=b[2];
    j=b[3];
    e();
    c=null!=i;
    b=[];
    z.isLoggedIn()&&(f={
        modelType:"member",
        id:"me",
        query:{
            notifications:"all",
            notifications_limit:5
        },
        next:c?null:h
        },b.push(f),this.reloadBoardsMenu({
        delay:500,
        reload:!0
        }));
    c&&b.push({
        modelType:g,
        id:d,
        query:i,
        path:j,
        next:h
    });
    0===b.length?"function"===typeof h&&h({}):this._loadMultiApiData(b)
    },
reloadBoardsMenu:function(b){
    var c,e,f,d,g=this;
    c=b.delay;
    b=b.reload;
    b&&(this._boardsMenuLoading=!1);
    if(!this._boardsMenuLoading){
        if(0<c)return setTimeout(function(){
            return g.reloadBoardsMenu({
                delay:0
            })
            },c);
        this._boardsMenuLoading=!0;
        f=["pinned","open"];
        d=[];
        for(b=0,e=f.length;b<e;b++)c=f[b],d.push(this._loadApiData("member","me",Dc(c)));
        return d
        }
    },
loadHeaderData:function(b){
    return this._loadApiDataAndHeader(b)
    },
loadBoardData:function(b,c,e){
    return this._loadApiDataAndHeader("board",b,c,e)
    },
loadBoardListData:function(b,c,e){
    return this._loadApiData("board",b,c,e)
    },
loadCardData:function(b,c,e){
    return this._loadApiData("card",c,{},"boards/"+b+"/cards/"+c,e)
    },
loadCardActions:function(b,c,e){
    return this._loadApiData("card",c,Na,"boards/"+b+"/cards/"+c,e)
    },
loadNotificationData:function(b,c){
    return this._loadApiDataAndHeader("member",b,{
        notifications:"all",
        notifications_limit:20
    },c)
    },
loadMoreNotificationData:function(b,c,e){
    return $.get("/1/members/"+b+"/notifications",{
        filter:"all",
        limit:20,
        page:c
    }).done(function(b){
        d("notification",b);
        return"function"===typeof e?
        e(null,b):void 0
        }).fail(function(){
        return"function"===typeof e?e("error"):void 0
        })
    },
loadMemberBoardsData:function(b,c){
    return this._loadApiDataAndHeader("member",b,Gc,c)
    },
loadBoardsMenuData:function(b){
    return this._loadApiData("member","me",Cc,b)
    },
loadMoreActionData:function(){
    var b,c,e,f,d,g,h;
    d=arguments[0];
    e=arguments[1];
    h=arguments[2];
    f=arguments[3];
    b=6<=arguments.length?W.call(arguments,4,c=arguments.length-1):(c=4,[]);
    g=arguments[c++];
    c=b[0];
    b=b[1];
    f={
        filter:"all",
        limit:f,
        page:h
    };
    
    null!=c&&(f.idModels=
        c.join(","));
    null!=b&&(f.filter=b);
    return this._loadApiData("action",e,f,""+d+"s/"+e+"/actions",g)
    },
loadMemberData:function(b,c){
    return this._loadApiDataAndHeader("member",b,{},c)
    },
loadMemberAccountData:function(b,c){
    return this._loadApiDataAndHeader("member",b,Fc,c)
    },
loadMemberProfileData:function(b,c){
    return this._loadApiDataAndHeader("member",b,Hc,c)
    },
loadMemberPasswordData:function(b,c){
    return this._loadApiData("member",b,{
        fields:"loginTypes"
    },c)
    },
loadOrganizationData:function(){
    var b,c,e,f,d;
    c=arguments[0];
    f=4<=arguments.length?W.call(arguments,1,d=arguments.length-2):(d=1,[]);
    e=arguments[d++];
    b=arguments[d++];
    return(f[0]?this._loadApiData:this._loadApiDataAndHeader).call(this,"organization",c,Ic,function(c,f){
        return null!=c||null==f?b(c):e(f)
        })
    },
loadOrgNameById:function(b,c,e){
    return this._loadApiData("organization",b,{
        fields:"name"
    },function(b,f){
        return null!=b||null==(null!=f?f.name:void 0)?e(b):c(f.name)
        })
    },
loadCurrentBoardData:function(b,c){
    return this.loadBoardData(b,Ec,c)
    },
loadBoardMenuData:function(b,
    c){
    return this.loadBoardListData(b,Bc,c)
    },
loadBoardNames:function(b,c){
    var e=this;
    return async.forEach(b,function(b,c){
        return e._loadApiData("board",b,{
            fields:"name,closed"
        },c)
        },c)
    },
loadSearchData:function(b,c){
    return this._loadApiData("search",null,b,"search",c)
    },
finishInit:function(c){
    return b(c)
    }
};

_.each(h,function(b){
    j[b]=function(c){
        var e;
        return e={
            get:function(b){
                return g[c][b]
                },
            getList:function(b){
                return _.compact(_.map(b,e.get))
                },
            all:function(){
                return f[c]
                },
            add:function(d,g,h){
                var i,l,o;
                null==
                h&&(h=!1);
                f[c].push(d);
                e.updateId(d);
                if(!g&&(j[b].trigger("add",d),h&&j[b].trigger("pushadd",d),"Action"===b)){
                    o=d.idModels();
                    for(i=0,l=o.length;i<l;i++)g=o[i],j[b].trigger("add:"+g,d),h&&j[b].trigger("pushadd:"+g,d)
                        }
                    },
        remove:function(e,d){
            var h,i,l,o,q;
            if(h=g[c][e]){
                f[c]=_.filter(f[c],function(b){
                    return b.id!==e
                    });
                delete g[c][e];
                if(!d){
                    j[b].trigger("remove",h);
                    if("Action"===b){
                        o=h.idModels();
                        for(i=0,l=o.length;i<l;i++)e=o[i],j[b].trigger("remove:"+e,h)
                            }
                            "Card"===b&&null!=(q=h.getList())&&q.trigger("changeCards")
                    }
                    "function"===
                typeof h.destructor&&h.destructor()
                }
            },
    updateId:function(b,e){
        (e=e||b.id)&&(g[c][e]=b)
        },
    find:function(b,e){
        var d,g,h,j,i;
        j=f[c];
        i=[];
        for(g=0,h=j.length;g<h;g++)d=j[g],_.isEqual(d.get(b),e)&&i.push(d);
        return i
        }
    }
}(b.toLowerCase()+"s");
return _.extend(j[b],Backbone.Events)
});
j.Notification.sortedByDateDescending=function(){
    return this.all().sort(function(b,c){
        return new Date(c.get("date"))-new Date(b.get("date"))
        })
    };
    
j.Action.getListForModel=function(){
    var b,c,e;
    if(2===arguments.length)e=arguments[0],
        b=arguments[1];
    else if(1===arguments.length)c=arguments[0],e=c.typeName,b=c.id;else return;
    e=e.toLowerCase();
    return _.filter(this.all(),function(c){
        return c.includesModel(e,b)
        })
    };
    
j.Action.removeActionsForModel=function(b,c,e){
    var f,d;
    d=this.getListForModel(b,c);
    for(c=0,f=d.length;c<f;c++)b=d[c],this.remove(b.id,e)
        };
        
j.Action.update=function(b){
    var c,e,f,d,g,h,i,l;
    e=[];
    i=null!=b?b:[];
    for(f=0,g=i.length;f<g;f++){
        c=i[f];
        (b=Models.Action.get(null!=(d=c._id)?d:c.id))?b.set(c,{
            silent:!0
            }):(b=new Ra(c),Models.Action.add(b,
            !0));
        l=b.idModels();
        for(c=0,h=l.length;c<h;c++)b=l[c],0>aa.call(e,b)&&e.push(b)
            }
            g=[];
    for(d=0,f=e.length;d<f;d++)b=e[d],g.push(j.Action.trigger("add:"+b));
    return g
    };
    
j.Member.update=function(b){
    var c,e,f,d,g,h;
    h=[];
    for(f=0,d=b.length;f<d;f++)e=b[f],c=Models.Member.get(null!=(g=e._id)?g:e.id),null!=c?h.push(c.set(e,{
        silent:!0
        })):(c=new ta(e),Models.Member.add(c,!0),h.push(c.postInitialize()));
    return h
    };
    
$(rpc).bind("updateModels",function(b,c){
    c.idBoard&&o(Models.Board.get(c.idBoard),c);
    c.idMember&&n(Models.Member.get(c.idMember),
        c);
    c.idOrganization&&v(Models.Organization.get(c.idOrganization),c);
    c.idNotification&&s(Models.Notification.get(c.idNotification),c);
    c.idAction&&i(c)
    });
u=function(c,e){
    var f,d,g,h,j,i,l;
    g={
        Member:ta,
        Organization:Sa,
        Action:Ra,
        Board:xb,
        Notification:bc
    };
    
    if(c.typeName!==e)return!1;
    i=c.deltas;
    for(h=0,j=i.length;h<j;h++)f=i[h],d=null!=(l=f.id)?l:f._id,(d=Models[e].get(d))?t(d,f):(d=new g[e](f),Models[e].add(d,!1,!0)),b(d);
    return!0
    };
    
t=function(b,c){
    var e;
    b.set(c,{
        fromServer:!0
        });
    return null!=(e=Models[b.typeName])?
    e.trigger("change",b):void 0
    };
    
o=function(c,e){
    var f,d,g,h,j,i,l,o,q;
    h={
        Member:ta,
        Organization:Sa,
        Card:xa
    };
    
    if(!u(e,"Board"))if(j=e.typeName,c){
        o=e.deltas;
        for(i=0,l=o.length;i<l;i++)f=o[i],null!=h[j]?(d=null!=(q=f.id)?q:f._id,(g=Models[j].get(d))?t(g,f):(d=h[j],g=new d(f),Models[j].add(g)),b(g),"Card"===j&&g.ready(function(){
            var b;
            return null!=(b=g.getList())?b.refreshCardList():void 0
            })):(d=c["get"+j],(g="function"===typeof d?d(f.id):void 0)?t(g,f):(d=c[""+m.lowerCaseFirstChar(j)+"List"],null!=d&&
            d.add([f])))
        }else console.log("UNHANDLED UPDATE MESSAGE")
        };
        
n=function(b,c){
    return u(c,"Member")?void 0:console.log("UNHANDLED UPDATE MESSAGE")
    };
    
s=function(b,c){
    return u(c,"Notification")?void 0:console.log("UNHANDLED UPDATE MESSAGE")
    };
    
i=function(b){
    return u(b,"Action")?void 0:console.log("UNHANDLED UPDATE MESSAGE")
    };
    
v=function(b,c){
    var e,f,d,g,h,j,i,l,o;
    g={
        Member:ta
    };
    
    if(!u(c,"Organization")){
        h=c.typeName;
        if(b){
            l=c.deltas;
            for(j=0,i=l.length;j<i;j++)e=l[j],d=null!=(o=e.id)?o:e._id,g[h]?(f=Models[h].get(d))?
                t(f,e):(d=g[h],Models[h].add(new d(e))):(f=b["get"+h],(f="function"===typeof f?f(d):void 0)?t(f,e):(d=b[""+m.lowerCaseFirstChar(h)+"List"],null!=d&&d.add([e])));
            return f
            }
            return console.log("UNHANDLED UPDATE MESSAGE")
        }
    };

$(rpc).bind("deleteModels",function(b,c){
    var e,f,d,g,h,j,i;
    if(e=Models.Board.get(c.idBoard)){
        j=c.deltas;
        for(g=0,h=j.length;g<h;g++)switch(f=j[g],d=null!=(i=f.id)?i:f._id,c.typeName){
            case "BoardInvitation":
                e.boardInvitationList.remove(d);
                break;
            case "CheckItem":
                e.checklistList.each(function(b){
                b.checkItemList.remove(d)
                });
            break;
            case "Card":
                Models.Action.removeActionsForModel("Card",d);
                Models.Card.remove(d);
                break;
            case "Action":
                Models.Action.remove(d);
                break;
            default:
                console.log("UNHANDLED DELETE MESSAGE")
                }
            }
        if(e=Models.Organization.get(c.idOrganization)){
    j=c.deltas;
    for(g=0,h=j.length;g<h;g++)switch(f=j[g],c.typeName){
        case "OrganizationInvitation":
            e.invitationList.remove(f.id)
            }
        }
    null!=c.idNotification?Models.Notification.remove(c.idNotification):null!=c.idAction&&Models.Action.remove(c.idAction)
});
return j
}();
$b=function(d){
    function c(){
        this.withIdParents=
        i(this.withIdParents,this);
        this.onId=i(this.onId,this);
        this.updateNew=i(this.updateNew,this);
        this.setReady=i(this.setReady,this);
        this.ready=i(this.ready,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.ready=function(b){
        b&&(this.isReady?b():(this.waitingForReady||(this.waitingForReady=[]),this.waitingForReady.push(b)))
        };
        
    c.prototype.setReady=function(){
        var b,c,f,d;
        this.isReady=!0;
        if(this.waitingForReady){
            c=this.waitingForReady;
            this.waitingForReady=null;
            for(f=0,d=c.length;f<
                d;f++)b=c[f],"function"===typeof b&&b()
                }
            };
    
c.prototype.updateNew=function(){
    var b,c,f,d,h;
    d=arguments[0];
    f=3<=arguments.length?W.call(arguments,1,h=arguments.length-1):(h=1,[]);
    c=arguments[h++];
    f=f[0];
    f=(null!=f?f:{}).waitForServer;
    b=this;
    f||Backbone.Model.prototype.set.call(this,d);
    return ua({
        url:"/1/"+b.typeName+"/"+b.id,
        type:"put",
        data:d,
        success:function(f){
            b.set(f,{
                fromServer:!0
                });
            return"function"===typeof c?c(null,f):void 0
            },
        interceptErrors:!0,
        error:function(b,f,d,g){
            f=b.status;
            b=b.responseText;
            return 400===f?("undefined"!==typeof console&&null!==console&&"function"===typeof console.error&&console.error(b),"function"===typeof c?c(b,null):void 0):g()
            }
        })
};

c.prototype.onId=function(b){
    var c,f;
    f=this;
    f.id?b(f.id):(c=function(){
        c=function(){};
        
        return _.defer(function(){
            f.unbind("change:id",c);
            return b(f.id)
            })
        },f.bind("change:id",c))
    };
    
c.prototype.withIdParents=function(b){
    b([])
    };
    
return c
}(function(d){
    function c(){
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.bindEvents=
    function(){
        var b,c,f,d,h;
        b=arguments[0];
        f=2<=arguments.length?W.call(arguments,1):[];
        for(d=0,h=f.length;d<h;d++)c=f[d],this.bind(c,b);
        return this
        };
        
    c.prototype.bindEventsDebounced=function(){
        var b,c;
        b=arguments[0];
        c=2<=arguments.length?W.call(arguments,1):[];
        return this.bindEvents.apply(this,[_.debounce(b,20)].concat(W.call(c)))
        };
        
    c.prototype.bindOnce=function(b,c){
        return this.unbind(b,c).bind(b,c)
        };
        
    return c
    }(Backbone.Model));
la=function(d){
    function c(){
        this.getView=i(this.getView,this);
        this.clearCache=
        i(this.clearCache,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.destructor=function(){
        return this.clearCache()
        };
        
    c.prototype.destroy=function(){
        this.destructor();
        return c.__super__.destroy.apply(this,arguments)
        };
        
    c.prototype.clearCache=function(){
        var b,c,f;
        if(this.viewCache){
            f=this.viewCache;
            for(b in f)c=f[b],"function"===typeof c.destructor&&c.destructor(),delete this.viewCache[b];return delete this.viewCache
            }
        };
    
c.prototype.getView=function(b,c,f){
    var d,h;
    h=b.prototype.uniqueId();
    d=c?h+":"+c:h;
    this.viewCache||(this.viewCache={});
    c=this.viewCache;
    if(!c[d]){
        if(!b||!_.isFunction(b)){
            J("render","view does not exist",h);
            return
        }
        f=_.extend({
            model:this
        },f);
        c[d]=new b(f)
        }
        c[d].delegateEvents();
    return c[d]
    };
    
return c
}($b);
wa=function(d){
    function c(){
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.bindEvents=function(){
        var b,c,f,d,h;
        b=arguments[0];
        f=2<=arguments.length?W.call(arguments,1):[];
        for(d=0,h=f.length;d<h;d++)c=f[d],this.bind(c,b);
        return this
        };
        
    c.prototype.onAddRemove=
    function(b){
        this.bindEvents(b,"add","remove","refresh");
        return this
        };
        
    return c
    }(Backbone.Collection);
Fa=function(d){
    function c(){
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.create=function(b,e){
        b=c.__super__.create.apply(this,arguments);
        Models.finishInit(b)
        };
        
    c.prototype.add=function(b,e){
        var f;
        this.options&&this.options.model&&(_.isArray(b)||(b=[b]),f=this,b=_.map(b,function(b){
            var c;
            (c=!b.cid)&&(b=new f.model(b));
            b.collection=f;
            c&&Models.finishInit(b);
            return b
            }));
        return c.__super__.add.apply(this,
            arguments)
        };
        
    c.prototype.addPlaceholder=function(b){
        var c,f=this;
        c=_.uniqueId("placeholder");
        _.extend(b,{
            id:c
        });
        this.add(b);
        return function(){
            return f.remove(c,{
                silent:!0
                })
            }
        };
    
return c
}(wa)
}
if(C("modelWithPreferences")){
    var dd,yb,D={}.hasOwnProperty,u=function(d,c){
        function b(){
            this.constructor=d
            }
            for(var e in c)D.call(c,e)&&(d[e]=c[e]);b.prototype=c.prototype;
        d.prototype=new b;
        d.__super__=c.prototype;
        return d
        },aa=[].indexOf||function(d){
        for(var c=0,b=this.length;c<b;c++)if(c in this&&this[c]===d)return c;
        return-1
        };
        
    yb=function(d){
        function c(){
            return c.__super__.constructor.apply(this,arguments)
            }
            u(c,d);
        c.prototype.prefNames=[];
        c.prototype.toJSON=function(b){
            var e,f,d,h,j;
            null==b&&(b={});
            e=c.__super__.toJSON.apply(this,arguments);
            if(b.prefs){
                j=this.prefNames;
                for(d=0,h=j.length;d<h;d++)f=j[d],e[f]=this.getPref(f),e[""+f+"_"+this.getPref(f)]=!0
                    }
                    return e
            };
            
        c.prototype.getPref=function(b){
            var c;
            return null!=(c=this.get("prefs"))?c[b]:void 0
            };
            
        c.prototype.setPref=function(b,c){
            var f;
            f={};
            
            f[b]=c;
            return this.set({
                prefs:f
            })
            };
        return c
        }(la);
    dd=function(d){
        function c(){
            return c.__super__.constructor.apply(this,arguments)
            }
            u(c,d);
        c.prototype.myPrefNames=[];
        c.prototype.myPrefDefaults={};
        
        c.prototype.toJSON=function(b){
            var e,f,d,h,j,i;
            null==b&&(b={});
            e=c.__super__.toJSON.apply(this,arguments);
            if(b.prefs){
                i=this.myPrefNames;
                for(h=0,j=i.length;h<j;h++)f=i[h],d=this.getPref(f),e[f]=d,e[""+f+"_"+d]=!0
                    }
                    return e
            };
            
        c.prototype.getPref=function(b){
            var e,f,d,h,j;
            return 0<=aa.call(this.myPrefNames,b)?null!=(e=null!=(f=null!=(d=null!=(h=
                this.get("myPrefs"))?h[b]:void 0)?d:null!=(j=this.get("prefs"))?j[b]:void 0)?f:this.myPrefDefaults[b])?e:!0:c.__super__.getPref.apply(this,arguments)
            };
            
        c.prototype.setPref=function(b,e){
            return 0<=aa.call(this.myPrefNames,b)?this.setMyPref(b,e):c.__super__.setPref.apply(this,arguments)
            };
            
        c.prototype.setMyPref=function(b,c){
            var f;
            ua({
                url:"/1/boards/"+this.id+"/myPrefs",
                type:"post",
                data:{
                    name:b,
                    value:c
                },
                dataType:"json",
                error:function(b){
                    return"undefined"!==typeof console&&null!==console?"function"===typeof console.error?
                    console.error(b):void 0:void 0
                    }
                });
        f={};
        
        f[b]=c;
        return this.set({
            myPrefs:f
        })
        };
        
    return c
    }(yb)
}
C("memberowner")&&(y.MemberOwner={
    renderMembers:function(d,c){
        var b,e;
        e=this.model;
        b=$(this.el).find(d);
        b.html("");
        e.memberList.sortBy(function(b){
            return function(){
                if(z.isMe(b))return"0";
                switch(b.get("status")){
                    case "active":
                        return"1";
                    case "idle":
                        return"2";
                    default:
                        return"3"
                        }
                    }()+b.get("fullName")
            }).forEach(function(f){
        f=new c({
            model:f,
            parent:e
        });
        b.append(f.render().el)
        });
    DragSort.refreshDraggable();
    return this
    },
getMemberType:function(d){
    var c,b;
    c=null!=d&&d.id?d.id:d;
    return(b=_.detect(this.get("memberships"),function(b){
        return b.idMember===c
        }))?b.memberType:this.get("invited")||_.detect(this.get("invitations"),function(b){
        return b.idMemberInvited===c
        })?"invited":this.organization&&_.detect(this.organization.get("memberships"),function(b){
        return b.idMember===c
        })?"org":"public"
    }
});
if(C("invitations")){
    var ed,fd,zb,cc,gd,hd,i=function(d,c){
        return function(){
            return d.apply(c,arguments)
            }
        },D={}.hasOwnProperty,
u=function(d,c){
    function b(){
        this.constructor=d
        }
        for(var e in c)D.call(c,e)&&(d[e]=c[e]);b.prototype=c.prototype;
    d.prototype=new b;
    d.__super__=c.prototype;
    return d
    };
    
zb=function(d){
    function c(){
        this.getParent=i(this.getParent,this);
        this.withIdParents=i(this.withIdParents,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.typeName="Invitation";
    c.prototype.initialize=function(b,c){
        Api.init(this);
        J("invitation",c);
        this.invitationList=c.collection;
        this.setReady()
        };
        
    c.prototype.withIdParents=
    function(b){
        return this.getParent().onId(function(c){
            return b([c])
            })
        };
        
    c.prototype.getParent=function(){
        return this.invitationList.options.model
        };
        
    return c
    }(la);
cc=function(d){
    function c(){
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.model=zb;
    c.prototype.initialize=function(b,c){
        this.options=c
        };
        
    c.prototype.comparator=function(b){
        return b.get("dateExpires")?-U.parse(b.get("dateExpires")):-Infinity
        };
        
    return c
    }(wa);
ed=function(d){
    function c(){
        return c.__super__.constructor.apply(this,
            arguments)
        }
        u(c,d);
    c.prototype.typeName="BoardInvitation";
    return c
    }(zb);
fd=function(d){
    function c(){
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.model=ed;
    return c
    }(cc);
gd=function(d){
    function c(){
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.typeName="OrganizationInvitation";
    return c
    }(zb);
hd=function(d){
    function c(){
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.model=gd;
    return c
    }(cc);
(function(d){
    function c(){
        this.render=
        i(this.render,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.getViewTitle=function(){
        return"Adding Members"
        };
        
    c.prototype.render=function(){
        $(this.el).html(t.fill("popover_helper_add_member"));
        return this
        };
        
    return c
    })(N)
}
if(C("member")){
    var hb,Ga,dc,id,ec,ib,ta,bd,jd,kd,ld,md,nd,od,jb,pd,fc,kb,qd,rd,D={}.hasOwnProperty,u=function(d,c){
        function b(){
            this.constructor=d
            }
            for(var e in c)D.call(c,e)&&(d[e]=c[e]);b.prototype=c.prototype;
        d.prototype=new b;
        d.__super__=c.prototype;
        return d
        },aa=[].indexOf||function(d){
        for(var c=0,b=this.length;c<b;c++)if(c in this&&this[c]===d)return c;return-1
        },i=function(d,c){
        return function(){
            return d.apply(c,arguments)
            }
        };
    
ta=function(d){
    function c(){
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.typeName="Member";
    c.prototype.nameAttr="fullName";
    c.prototype.initialize=function(){
        Api.init(this)
        };
        
    c.prototype.postInitialize=function(){
        var b,c=this;
        b=function(b,d){
            var h,j;
            j=new b;
            if(c.isLoggedIn())return h=function(){
                return j.refresh(Models[b.prototype.model.prototype.typeName].getList(c.get(d)))
                },
            c.bind("change:"+d,h),Models[b.prototype.model.prototype.typeName].bind("add",_.debounce(h,20)),h()
                };
                
        this.boardList=b(lb,"idBoards");
        this.boardPinnedList=b(lb,"idBoardsPinned");
        this.boardInvitedList=b(lb,"idBoardsInvited");
        this.organizationList=b(OrganizationList,"idOrganizations");
        this.organizationInvitedList=b(OrganizationList,"idOrganizationsInvited");
        this.setReady()
        };
        
    c.prototype.isLoggedIn=function(){
        return!this.get("notLoggedIn")
        };
        
    c.prototype.hasAtMe=function(b){
        var c;
        if(!this.isLoggedIn())return!1;
        c=_.compact([this.get("username")].concat(this.get("fullName").split(/\s+/)));
        return _.detect(c,function(c){
            return 2<=c.length&&RegExp("(^|\\W)@"+m.escapeForRegex(c)+"($|\\W)","i").test(b)
            })
        };
        
    c.prototype.viewBoardProfile=function(b){
        var c;
        null!=b&&b.id&&(b=b.id);
        c=this.getView(md,b,{
            board:Models.Board.get(b)
            });
        Controller.saveMemberBoardProfileLocation(this,b);
        return F.show({
            view:c,
            hide:function(){
                return Controller.saveBoardLocation(b)
                }
            })
    };
    
c.prototype.getMembershipData=function(b){
    var c,f,d,h,j,i,
    o,q,n;
    n=m.toTitleCase(b.typeName);
    f="Board"===n;
    o="Organization"===n;
    c=b.memberList.filter(function(c){
        return b.ownedByMember(c)
        });
    d=z.isMe(this);
    i=1<=_.without(c,this).length;
    h=2<=c.length;
    j=1<b.memberList.length;
    q=b.ownedByMember(this);
    c=b.owned();
    return{
        object:n,
        isBoard:f,
        isOrg:o,
        canRemove:d&&i||c&&!d,
        isMe:d,
        canChangeRole:c,
        memberIsAdmin:q,
        canMakeMember:q&&h&&c,
        isMoreThanOneAdmin:h,
        isMoreThanOneMember:j
    }
};

c.prototype.owned=function(){
    var b;
    return(b=z.me())&&b===this
    };
    
c.prototype.prefNames=["minutesBetweenSummaries"];
c.prototype.getMemberViewTitle=function(){
    var b;
    b=this.get("username");
    return""+this.get("fullName")+" ("+b+")"
    };
    
c.prototype.toggleColorBlindMode=function(){
    null!=this.get("prefs")&&(this.get("prefs").colorBlind?this.setPref("colorBlind",!1).save():this.setPref("colorBlind",!0).save(),$("body").toggleClass("color-blind-mode-enabled",this.get("prefs").colorBlind))
    };
    
c.prototype.checkColorBlindMode=function(){
    var b;
    return $("body").toggleClass("color-blind-mode-enabled",!0===(null!=(b=this.get("prefs"))?
        b.colorBlind:void 0))
    };
    
c.prototype.toJSON=function(b){
    var e;
    null==b&&(b={});
    e=c.__super__.toJSON.apply(this,arguments);
    b.hasPassword&&(e.hasPassword=0<=aa.call(e.loginTypes,"password"));
    return e
    };
    
return c
}(yb);
jb=function(d){
    function c(){
        this.idList=i(this.idList,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.model=ta;
    c.prototype.initialize=function(b,c){
        this.options=c
        };
        
    c.prototype.idList=function(){
        return this.pluck("id")
        };
        
    return c
    }(wa);
kb=function(d){
    function c(){
        this.renderFreqText=
        i(this.renderFreqText,this);
        this.render=i(this.render,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.initialize=function(){
        this.model.bindEventsDebounced(this.render,"change:initials","change:avatarHash","change:avatarSource","change:fullName","change:username","change:bio","change:prefs")
        };
        
    c.prototype.events={
        "click .js-change-avatar-profile":"changeAvInProfile"
    };
    
    c.prototype.render=function(){
        var b,c=this;
        b=z.isMe(this.model);
        $(this.el).html(t.fill("member_detail",
            this.model.toJSON(),{
                editable:b
            }));
        setTimeout(function(){
            c.renderMainContent()
            },0);
        return this
        };
        
    c.prototype.renderFreqText=function(){
        var b,c;
        c=$(this.el).find(".js-change-email-freq");
        b=this.model.toJSON({
            prefs:!0
            });
        c.html(t.fill("member_email_freq",b))
        };
        
    c.prototype.changeAvInProfile=function(b){
        m.stop(b);
        n("Member","Avatar","Open Change Avatar Menu - From Profile Photo");
        v.toggle({
            elem:$(b.target).closest(".js-change-avatar-profile")[0],
            top:180,
            view:this.model.getView(hb)
            })
        };
        
    c.prototype.setActiveView=
    function(b){
        $(b).addClass("active")
        };
        
    c.prototype.delegateEvents=function(b){
        return c.__super__.delegateEvents.call(this,_.extend({},c.prototype.events,b||this.events))
        };
        
    return c
    }(N);
fc=db(Pa,function(d){
    function c(){
        this.changeEmail=i(this.changeEmail,this);
        this.editProfile=i(this.editProfile,this);
        this.getActionsFilter=i(this.getActionsFilter,this);
        this.renderActions=i(this.renderActions,this);
        this.renderMainContent=i(this.renderMainContent,this);
        return c.__super__.constructor.apply(this,arguments)
        }
    u(c,d);
    c.prototype.events={
        "click .js-more-actions":"loadMoreActions",
        "click .js-edit-profile":"editProfile",
        "click .js-change-email":"changeEmail"
    };
    
    c.prototype.initialize=function(){
        c.__super__.initialize.apply(this,arguments);
        this.limit=10;
        this.debouncedRenderActions=_.debounce(this.renderActions,20);
        return Models.Action.bind("add:"+this.model.id,this.debouncedRenderActions)
        };
        
    c.prototype.renderMainContent=function(){
        var b;
        b=this.model.toJSON();
        b.editable=z.isMe(this.model);
        b.bioHtml=ga.textAsHtml(b.bio,

        {
            convertNewlines:!0
            });
        b.emptyActions=0===this.getActions().length;
        $(this.el).find(".window-main-col").html(t.fill("member_profile",b,{
            editable:z.isMe(this.model)
            }));
        0<this.model.organizationList.length?(b=new sd({
            model:this.model
            }),$(this.el).find(".list-orgs").html(b.render().el)):$(this.el).find(".list-orgs").closest(".window-module").hide();
        this.setActiveView(".js-member-profile");
        return this.renderActions()
        };
        
    c.prototype.renderActions=function(){
        var b;
        b=$(this.el).find(".list-actions");
        (new Da(this.getActions())).renderTo(b,

        {
            key:this.model.id,
            model:this.model,
            showBoard:!0,
            showOrganization:!0
            });
        $(this.el).find(".js-more-actions").toggle(this.hasMoreActions());
        return this
        };
        
    c.prototype.getActionsFilter=function(){
        return Kb
        };
        
    c.prototype.editProfile=function(b){
        m.stop(b);
        n("Member","Profile","Click Edit Profile");
        v.toggle({
            elem:$(b.target).closest(".js-edit-profile")[0],
            top:38,
            view:this.model.getView(ib)
            })
        };
        
    c.prototype.changeEmail=function(b){
        m.stop(b);
        n("Member","Profile","Click Change Email");
        v.toggle({
            elem:$(b.target).closest(".js-change-email")[0],
            top:38,
            view:this.model.getView(dc)
            })
        };
        
    return c
    }(kb));
pd=function(d){
    function c(){
        this.loadMoreNotifications=i(this.loadMoreNotifications,this);
        this.destructor=i(this.destructor,this);
        this.renderNotificationList=i(this.renderNotificationList,this);
        this.renderSingleNotification=i(this.renderSingleNotification,this);
        this.renderMainContent=i(this.renderMainContent,this);
        this.initialize=i(this.initialize,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.events={
        "click .js-more-notifications":"loadMoreNotifications",
        "click .js-change-email-freq":"changeEmailFreq"
    };
    
    c.prototype.initialize=function(){
        var b=this;
        c.__super__.initialize.apply(this,arguments);
        this.nextPage=1;
        this.isMore=!0;
        Models.Notification.bind("add",this.renderSingleNotification);
        Models.Notification.bind("remove",this.renderNotificationList);
        Models.Notification.bind("add",function(){
            return b.notificationCount++
            });
        Models.Notification.bind("remove",function(){
            return b.notificationCount--
            });
        return this.model.bind("change:prefs",this.renderFreqText)
        };
    c.prototype.renderMainContent=function(){
        var b;
        b=this.model.toJSON({
            prefs:!0
            });
        b.editable=z.isMe(this.model);
        b.empty=0===Models.Notification.all().length;
        $(this.el).find(".window-main-col").html(t.fill("member_notifications",b,{
            editable:z.isMe(this.model)
            }));
        this.isMore||$(this.el).find(".js-more-notifications").hide();
        this.renderFreqText();
        this.renderNotificationList();
        this.setActiveView(".js-member-notifications");
        return this
        };
        
    c.prototype.renderSingleNotification=function(b){
        var c;
        $(this.el).find(".empty-list").remove();
        c=$(this.el).find(".list-notifications");
        b=b.getView(gc);
        return c.prepend(b.render().el)
        };
        
    c.prototype.renderNotificationList=function(){
        var b,c,f,d,h;
        b=$(this.el).find(".list-notifications");
        b.empty();
        h=Models.Notification.sortedByDateDescending();
        for(f=0,d=h.length;f<d;f++)c=h[f],c=c.getView(gc),b.append(c.render().el);
        this.setActiveView(".js-member-notifications");
        return this
        };
        
    c.prototype.destructor=function(){
        var b,c,f,d,h;
        d=Models.Notification.all();
        h=[];
        for(c=0,f=d.length;c<f;c++)b=d[c],b.get("unread")&&
            h.push(b.markRead());
        return h
        };
        
    c.prototype.loadMoreNotifications=function(){
        var b=this;
        return Models.loadMoreNotificationData(this.model.get("username"),this.nextPage,function(c,f){
            if(!c&&(b.nextPage++,b.renderNotificationList(),20>f.length))return b.isMore=!1,$(b.el).find(".js-more-notifications").hide()
                })
        };
        
    c.prototype.changeEmailFreq=function(b){
        m.stop(b);
        n("Member","Notifications","Open Change Frequency Menu - From Notifications Page");
        return v.toggle({
            elem:$(b.target).closest(".js-change-email-freq")[0],
            top:25,
            view:this.model.getView(Ga,"notifications")
            })
        };
        
    return c
    }(kb);
nd=function(d){
    function c(){
        this.renderMainContent=i(this.renderMainContent,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.initialize=function(){
        c.__super__.initialize.apply(this,arguments);
        this.model.boardList.onAddRemove(this.renderMainContent);
        return this.model.bindEvents(this.renderMainContent,"change:idBoards","change:idOrganizations","change:idBoardsInvited","change:idOrganizationsInvited")
        };
        
    c.prototype.renderMainContent=
    function(){
        var b,c,f,d,h,j,i,o;
        $(this.el).find(".window-main-col").html(t.fill("member_boards",{},{
            owned:this.model.owned()
            }));
        f=$(this.el).find(".js-boards-list").html("");
        d=this.model.organizationList.models;
        h=this.model.boardList.models;
        for(j=0,i=h.length;j<i;j++)b=h[j],null!=b.organization&&(_.any(d,function(c){
            return b.get("idOrganization")===c.id
            })||d.push(b.organization));
        for(j=0,i=d.length;j<i;j++)h=d[j],h=this.model.getView(hc,"memberBoards_"+h.id,{
            organization:h
        }),f.append(h.render().el);
        h=this.model.getView(hc,"memberBoards",{
            organization:null
        });
        f.append(h.render().el);
        if(z.isMe(this.model)){
            if(null!=(o=this.model.get("idOrganizationsInvited"))&&o.length)d=new td({
                model:this.model
                }),f.prepend(d.render().el);
            if(null!=(c=this.model.get("idBoardsInvited"))&&c.length)c=new ud({
                model:this.model
                }),f.prepend(c.render().el)
                }
                this.setActiveView(".js-member-boards");
        return this
        };
        
    return c
    }(kb);
bd=function(d){
    function c(){
        this.render=i(this.render,this);
        return c.__super__.constructor.apply(this,
            arguments)
        }
        u(c,d);
    c.prototype.getViewTitle=function(){
        return"Account Settings"
        };
        
    c.prototype.initialize=function(){
        return this.model.bind("change:loginTypes",this.render)
        };
        
    c.prototype.events={
        "click .js-change-name-and-bio":"changeUserInfo",
        "click .js-change-avatar":"changeAvatar",
        "click .js-change-email-freq":"changeEmailFreq",
        "click .js-change-password":"changePassword"
    };
    
    c.prototype.render=function(){
        var b;
        b=this.model.toJSON({
            hasPassword:!0
            });
        b.memberAccountUrl=Controller.getMemberAccountUrl();
        $(this.el).html(t.fill("header_account_menu",b));
        return this
        };
        
    c.prototype.changeUserInfo=function(b){
        m.stop(b);
        n("Member","Account","Open Change User Info Menu - From Header");
        n("Header","User Menu","Open Change User Info Menu");
        return v.pushView({
            view:this.model.getView(ib)
            })
        };
        
    c.prototype.changeAvatar=function(b){
        m.stop(b);
        n("Member","Avatar","Open Change Avatar Menu - From Header");
        n("Header","User Menu","Open Change Avatar Menu");
        return v.pushView({
            view:this.model.getView(hb)
            })
        };
        
    c.prototype.changePassword=
    function(b){
        m.stop(b);
        n("Member","Account","Open Change Password Menu - From Header");
        n("Header","User Menu","Open Change Password Menu");
        return v.pushView({
            view:this.model.getView(ec)
            })
        };
        
    c.prototype.changeEmailFreq=function(b){
        m.stop(b);
        n("Member","Notifications","Open Change Frequency Menu - From Header");
        n("Header","User Menu","Open Change Frequency Menu");
        return v.pushView({
            view:this.model.getView(Ga,"account")
            })
        };
        
    return c
    }(E);
jd=function(d){
    function c(){
        this.toggleCB=i(this.toggleCB,this);
        this.deleteConfirm=
        i(this.deleteConfirm,this);
        this.renderMainContent=i(this.renderMainContent,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.initialize=function(){
        this.model.bind("change:loginTypes",this.renderMainContent);
        return this.model.bind("change:prefs",this.renderMainContent)
        };
        
    c.prototype.events={
        "click .js-change-avatar":"changeAvatar",
        "click .js-change-email-freq":"changeEmailFreq",
        "click .js-change-name-and-bio":"changeUserInfo",
        "click .js-change-password":"changePassword",
        "click .js-confirm-delete-member":"deleteConfirm",
        "click .js-change-email":"changeEmail",
        "click .js-toggle-cb-mode":"toggleCB"
    };
    
    c.prototype.renderMainContent=function(){
        var b;
        b=this.model.toJSON({
            prefs:!0,
            hasPassword:!0
            });
        b["avatarSource_"+b.avatarSource]=!0;
        b.cbEnabled=z.me().get("prefs").colorBlind;
        $(this.el).find(".window-main-col").html(t.fill("member_account",b,{
            editable:z.isMe(this.model)
            }));
        $(this.el).find(".member-applications").html(this.model.getView(kd,"",{
            data:this.options.data
            }).render().el);
        this.setActiveView(".js-member-account");
        return this
        };
        
    c.prototype.changeUserInfo=function(b){
        m.stop(b);
        n("Member","Account","Open Change User Info Menu");
        return v.toggle({
            elem:$(b.target).closest(".js-change-name-and-bio")[0],
            top:50,
            view:this.model.getView(ib)
            })
        };
        
    c.prototype.changeEmail=function(b){
        m.stop(b);
        n("Member","Account","Open Change Email Menu - From Account Page");
        return v.toggle({
            elem:$(b.target).closest(".js-change-email")[0],
            top:50,
            view:this.model.getView(dc)
            })
        };
        
    c.prototype.changeAvatar=
    function(b){
        m.stop(b);
        n("Member","Avatar","Open Change Avatar Menu - From Account Page");
        return v.toggle({
            elem:$(b.target).closest(".js-change-avatar")[0],
            top:50,
            view:this.model.getView(hb)
            })
        };
        
    c.prototype.changePassword=function(b){
        m.stop(b);
        n("Member","Account","Open Change Password Menu - From Account Page");
        return v.toggle({
            elem:$(b.target).closest(".js-change-password")[0],
            top:50,
            view:this.model.getView(ec)
            })
        };
        
    c.prototype.changeEmailFreq=function(b){
        m.stop(b);
        n("Member","Notifications","Open Change Frequency Menu - From Account Page");
        return v.toggle({
            elem:$(b.target).closest(".js-change-email-freq")[0],
            top:50,
            view:this.model.getView(Ga,"account")
            })
        };
        
    c.prototype.deleteConfirm=function(b){
        m.stop(b);
        n("Member","Account","Open Delete Account Confirmation Menu");
        v.toggle({
            elem:b.target,
            top:35,
            view:this.model.getView(od)
            })
        };
        
    c.prototype.toggleCB=function(b){
        m.stop(b);
        n("Member","Account","Toggle Color Blind Mode");
        this.model.toggleColorBlindMode()
        };
        
    return c
    }(kb);
ib=function(d){
    function c(){
        this.saveChanges=i(this.saveChanges,this);
        this.showError=
        i(this.showError,this);
        this.render=i(this.render,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.getViewTitle=function(){
        return"Change Name and Bio"
        };
        
    c.prototype.events={
        "click .js-save-changes":"saveChanges"
    };
    
    c.prototype.render=function(){
        var b;
        b=this.model.toJSON({
            prefs:!0
            });
        $(this.el).html(t.fill("popover_change_user_info",b));
        return this
        };
        
    c.prototype.getValue=function(b){
        return $(this.el).find("[name="+b+"]").val()
        };
        
    c.prototype.showError=function(b){
        return $(this.el).find("#account-error").text(null!=
            b?b:"error").show()
        };
        
    c.prototype.saveChanges=function(b){
        var c,f,d,h,j,i=this;
        m.preventDefault(b);
        b={};
        
        $(this.el).find("#account-error").hide();
        j=["fullName","initials","username","bio"];
        for(d=0,h=j.length;d<h;d++)c=j[d],b[c]=$.trim(this.getValue(c));
        b.username=b.username.toLowerCase().replace(/[^a-z0-9_]/g,"");
        b.initials=b.initials.toUpperCase();
        f=Controller.getMemberProfileUrl(this.model.get("username"))===Controller.location;
        this.model.save(b,{
            waitForServer:!0,
            success:function(){
                v.popView();
                f&&
                Controller.setLocation({
                    location:Controller.getMemberProfileUrl(i.model.get("username"))
                    });
                n("Member","Account","Successfully Change User Info")
                },
            error:function(b,c){
                i.showError(c)
                }
            })
    };
    
return c
}(E);
dc=function(d){
    function c(){
        this.saveChanges=i(this.saveChanges,this);
        this.showError=i(this.showError,this);
        this.render=i(this.render,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.getViewTitle=function(){
        return"Change Email"
        };
        
    c.prototype.events={
        "click .js-save-changes":"saveChanges"
    };
    c.prototype.render=function(){
        var b;
        b=this.model.toJSON({
            prefs:!0
            });
        $(this.el).html(t.fill("popover_change_email",b));
        return this
        };
        
    c.prototype.showError=function(b){
        return $(this.el).find("#account-error").text(null!=b?b:"error").show()
        };
        
    c.prototype.saveChanges=function(b){
        var c=this;
        m.preventDefault(b);
        return ua({
            type:"POST",
            url:"/1/members/me/changeEmail",
            data:{
                email:$(this.el).find('[name="email"]').val()
                },
            success:function(){
                v.popView();
                Z.flash("Email Sent","confirm");
                n("Member","Account","Successfully Change Email")
                },
            interceptErrors:!0,
            error:function(b,d,h,j){
                d=b.status;
                b=b.responseText;
                return 400===d?c.showError(b):j()
                }
            })
    };
    
return c
}(E);
ec=function(d){
    function c(){
        this.saveChanges=i(this.saveChanges,this);
        this.showPasswordError=i(this.showPasswordError,this);
        this.render=i(this.render,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.initialize=function(){
        return this.model.bind("change:loginTypes",this.render)
        };
        
    c.prototype.getViewTitle=function(){
        return 0>aa.call(this.model.get("loginTypes"),
            "password")?"Set Password":"Change Password"
        };
        
    c.prototype.events={
        "click .js-save-changes":"saveChanges"
    };
    
    c.prototype.render=function(){
        var b;
        b=this.model.toJSON({
            prefs:!0,
            hasPassword:!0
            });
        $(this.el).html(t.fill("popover_change_set_password",b));
        return this
        };
        
    c.prototype.getValue=function(b){
        return $(this.el).find("[name="+b+"]").val()
        };
        
    c.prototype.showPasswordError=function(b){
        return $(this.el).find("#password-error").text(null!=b?b:"error").show()
        };
        
    c.prototype.saveChanges=function(b){
        var c,f,d,h,
        j=this;
        m.preventDefault(b);
        c={};
        
        $(this.el).find("#password-error").hide();
        d=this.getValue("oldpassword");
        b=this.getValue("password");
        f=this.getValue("password2");
        h=function(){
            return j.model.save(c,{
                waitForServer:!0,
                success:function(){
                    Models.loadMemberPasswordData(j.model.id);
                    n("Member","Account","Successfully Change Password");
                    v.popView()
                    },
                error:function(b,c){
                    j.showError(c)
                    }
                })
        };
        
    b||f?b!==f?this.showPasswordError("Passwords must match."):this.model.api.updatePassword({
        oldPassword:d,
        newPassword:b
    },function(){
        return h(!0)
        },
    this.showPasswordError):h(!1)
    };
    
return c
}(E);
Ga=function(d){
    function c(){
        this.changeFreq=i(this.changeFreq,this);
        this.render=i(this.render,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.getViewTitle=function(){
        return"Send Emails..."
        };
        
    c.prototype.initialize=function(){
        return this.model.bind("change:prefs",this.render)
        };
        
    c.prototype.events={
        "click li a":"changeFreq"
    };
    
    c.prototype.render=function(){
        var b;
        b=this.model.toJSON({
            prefs:!0
            });
        $(this.el).html(t.fill("popover_set_email_freq",
            b));
        return this
        };
        
    c.prototype.changeFreq=function(b){
        n("Member","Notifications","Successfully Change Email Frequency");
        this.model.setPref("minutesBetweenSummaries",parseInt($(b.target).closest("a").attr("value"))).save();
        v.popView()
        };
        
    return c
    }(E);
hb=function(d){
    function c(){
        this.clearAvatar=i(this.clearAvatar,this);
        this.useGravatar=i(this.useGravatar,this);
        this.useUploadedAvatar=i(this.useUploadedAvatar,this);
        this.startUpload=i(this.startUpload,this);
        this.render=i(this.render,this);
        return c.__super__.constructor.apply(this,
            arguments)
        }
        u(c,d);
    c.prototype.getViewTitle=function(){
        return"Change Avatar"
        };
        
    c.prototype.initialize=function(){
        this.model.bind("change:avatarSource",this.render);
        return this.model.bind("change:uploadedAvatarHash",this.render)
        };
        
    c.prototype.events={
        "change .js-upload-avatar":"startUpload",
        "click .js-use-gravatar":"useGravatar",
        "click .js-use-uploaded-avatar":"useUploadedAvatar",
        "click .js-no-avatar":"clearAvatar"
    };
    
    c.prototype.render=function(){
        var b,c;
        b=this.model.toJSON({
            prefs:!0
            });
        b["avatarSource_"+
        b.avatarSource]=!0;
        $(this.el).html(t.fill("popover_avatar",b));
        c=$(this.el).find(".js-grav");
        b=c.find("img");
        $.get(b.attr("src"),function(){
            return c.show()
            });
        return this
        };
        
    c.prototype.startUpload=function(b){
        var c,f,d,h;
        h=_.uniqueId("iframe");
        d=$(b.target);
        c=$(this.el).find(".js-file-too-large").hide();
        n("Member","Avatar","Use Uploaded - New");
        f=$("<iframe>").attr("name",h).css("display","none").appendTo("body").load(function(){
            $("body.error",f.contents()).text()&&c.show();
            return setTimeout(function(){
                return f.remove()
                },
            1E3)
            });
        d.closest("form").attr("target",h).find("input[name=token]").val(z.myToken()).end().submit();
        return setTimeout(function(){
            return d.val("")
            },100)
        };
        
    c.prototype.useUploadedAvatar=function(){
        n("Member","Avatar","Use Uploaded - Existing");
        this.model.api.useUploadedAvatar();
        return v.popView()
        };
        
    c.prototype.useGravatar=function(){
        n("Member","Avatar","Use Gravatar");
        this.model.api.useGravatar();
        return v.popView()
        };
        
    c.prototype.clearAvatar=function(){
        n("Member","Avatar","Use Initials");
        this.model.api.clearAvatar();
        return v.popView()
        };
        
    return c
    }(E);
od=function(d){
    function c(){
        this.cancelDeleteMember=i(this.cancelDeleteMember,this);
        this.deleteMember=i(this.deleteMember,this);
        this.render=i(this.render,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.getViewTitle=function(){
        return"Delete Account?"
        };
        
    c.prototype.events={
        "click .js-delete-member":"deleteMember",
        "click .js-cancel-delete":"cancelDeleteMember"
    };
    
    c.prototype.render=function(){
        $(this.el).html(t.fill("popover_confirm_member_delete",
            this.model.toJSON()));
        return this
        };
        
    c.prototype.deleteMember=function(b){
        m.stop(b);
        $(this.el).find(".js-delete-member").attr("disabled","disabled");
        this.model.api.deleteAccount("troodbye!",function(){
            v.hide();
            Z.flash("Email Sent","confirm");
            n("Member","Account","Sent Account Delete Email")
            })
        };
        
    c.prototype.cancelDeleteMember=function(b){
        m.stop(b);
        v.hide()
        };
        
    return c
    }(E);
kd=function(d){
    function c(){
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.render=function(){
        var b,c,f,d,h;
        b=this.model.toJSON({
            prefs:!0
            });
        c=this.options.data.tokens;
        b.hasTokens=0<(null!=c?c.length:void 0);
        $(this.el).html(t.fill("member_application_list",b));
        if(null!=c){
            b=$(this.el).find(".applications");
            h=this.options.data.tokens;
            for(f=0,d=h.length;f<d;f++)c=h[f],b.append(this.model.getView(rd,c.id,c).render().el)
                }
                return this
        };
        
    return c
    }(E);
rd=function(d){
    function c(){
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.className="application clearfix";
    c.prototype.events={
        "click .js-revoke":"revoke"
    };
    c.prototype.render=function(){
        var b,c,f,d,h,j,i,o;
        o=this.options;
        c=o.dateExpires;
        h=o.permissions;
        f=o.identifier;
        b=o.dateCreated;
        b={
            identifier:f,
            dateApproved:U.toLongString(U.parse(b)),
            dateExpires:c?U.toLongString(U.parse(c)):null,
            neverExpires:null==c
            };
            
        _.isEmpty(h)?b.permissions="read access on your public boards and organizations":(h=function(){
            var b,c,e;
            e=[];
            for(b=0,c=h.length;b<c;b++)d=h[b],j="",d.read&&(j+="read"),d.write&&(j+="and write"),i=function(){
                if("*"===d.idModel)switch(d.modelType){
                    case "*":
                        return"your account and all boards and organizations";
                    case "Board":
                        return"all your boards";
                    case "Organization":
                        return"all your organizations";
                    default:
                        return"unknown"
                        }else switch(d.modelType){
                    case "Member":
                        return"your account";
                    case "Board":
                        return"a specific board";
                    case "Organization":
                        return"a specific organization";
                    default:
                        return"unknown"
                        }
                    }(),e.push(""+j+" access on "+i);
        return e
        }(),b.permissions=h.join(", "));
    $(this.el).html(t.fill("member_application",b));
    return this
    };
    
c.prototype.revoke=function(b){
    m.stop(b);
    n("Member","Applications","Revoke App");
    $(this.el).remove();
    return rpc.invoke("revokeToken",[this.options.id])
    };
    
return c
}(E);
ld=function(d){
    function c(){
        this.onReopen=i(this.onReopen,this);
        this.getList=i(this.getList,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.getList=function(){
        return this.model.boardList
        };
        
    c.prototype.getTitle=function(){
        return"Closed Boards"
        };
        
    c.prototype.getEmptyMessage=function(){
        return"No boards have been closed"
        };
        
    c.prototype.onReopen=function(b){
        return Controller.displayBoard({
            idBoard:b.id
            })
        };
    return c
    }(cd);
qd=function(d){
    function c(){
        this.unvote=i(this.unvote,this);
        this.vote=i(this.vote,this);
        this.render=i(this.render,this);
        this.showAll=i(this.showAll,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.getViewTitle=function(){
        return"Voters"
        };
        
    c.prototype.events={
        "click .js-more-members-voted":"showAll",
        "click .js-vote":"vote",
        "click .js-unvote":"unvote"
    };
    
    c.prototype.initialize=function(){
        var b=this;
        return this.model.bind("change:idMembersVoted",function(){
            return b.render()
            })
        };
    c.prototype.showAll=function(){
        this.render(!0);
        return v.calcTop()
        };
        
    c.prototype.render=function(b){
        var c,f;
        f=Models.Member.getList(this.model.get("idMembersVoted")||[]);
        var d,h,j;
        j=[];
        for(d=0,h=f.length;d<h;d++)c=f[d],j.push(c.toJSON());
        c={
            members:j
        };
        
        b||(c.members=c.members.slice(0,48),c.fewMembers=14>f.length,c.moreMembers=48<f.length,c.lengthDiff=f.length-48,c.canVote=this.model.getBoard().canVote(z.me()),c.voted=_.include(this.model.get("idMembersVoted"),z.myId()));
        $(this.el).html(t.fill("members_voted",
            c,{},{
                member:t.member
                }));
        return this
        };
        
    c.prototype.vote=function(b){
        m.preventDefault(b);
        this.model.vote(!0);
        return!1
        };
        
    c.prototype.unvote=function(b){
        m.preventDefault(b);
        this.model.vote(!1);
        0===this.model.get("idMembersVoted").length&&v.hide();
        return!1
        };
        
    return c
    }(E);
id=function(d){
    function c(){
        this.makeMember=i(this.makeMember,this);
        this.makeAdmin=i(this.makeAdmin,this);
        this.render=i(this.render,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.getViewTitle=function(){
        return"Change Role"
        };
    c.prototype.initialize=function(){
        this.parent=this.options.parent;
        this.parent.bind("change:memberships",this.render)
        };
        
    c.prototype.events={
        "click .js-make-admin":"makeAdmin",
        "click .js-make-member":"makeMember"
    };
    
    c.prototype.render=function(){
        var b;
        b=this.model.getMembershipData(this.parent);
        $(this.el).html(t.fill("popover_change_roles",b));
        return this
        };
        
    c.prototype.makeAdmin=function(b){
        m.stop(b);
        this.parent.ownedByMember(this.model)||this.parent.api.addAdmin(this.model.id)
        };
        
    c.prototype.makeMember=
    function(b){
        m.stop(b);
        this.parent.ownedByMember(this.model)&&this.parent.api.removeAdmin(this.model.id)
        };
        
    return c
    }(E);
md=db(Pa,function(d){
    function c(){
        this.removeAdmin=i(this.removeAdmin,this);
        this.makeAdmin=i(this.makeAdmin,this);
        this.removeMember=i(this.removeMember,this);
        this.renderActions=i(this.renderActions,this);
        this.render=i(this.render,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.initialize=function(){
        this.board=this.options.board;
        this.board.memberList.onAddRemove(this.render);
        this.debouncedRenderActions=_.debounce(this.renderActions,20);
        Models.Action.bind("add:"+this.model.id,this.debouncedRenderActions);
        this.idModels=[this.board.id];
        return this.loadMoreActions()
        };
        
    c.prototype.events={
        "click .js-remove-member":"removeMember",
        "click .js-make-admin":"makeAdmin",
        "click .js-remove-admin":"removeAdmin",
        "click .js-more-actions":"loadMoreActions"
    };
    
    c.prototype.render=function(){
        var b;
        b=_.extend(this.model.toJSON(),this.model.getMembershipData(this.board));
        $(this.el).html(t.fill("board_member_profile",
            b));
        return this.renderActions()
        };
        
    c.prototype.renderActions=function(){
        var b;
        b=$(this.el).find(".list-actions");
        (new Da(Models.Action.getListForModel(this.model))).renderTo(b,{
            key:this.model.id,
            model:this.model
            });
        $(this.el).find(".js-more-actions").toggle(this.hasMoreActions());
        return this
        };
        
    c.prototype.removeMember=function(){
        this.board.memberList.remove(this.model);
        this.board.api.removeMember(this.model.id);
        F.hide()
        };
        
    c.prototype.makeAdmin=function(){
        this.board.api.addAdmin(this.model.id,this.render)
        };
    c.prototype.removeAdmin=function(){
        this.board.api.removeAdmin(this.model.id,this.render)
        };
        
    c.prototype.getActionsFilter=function(){
        return Kb
        };
        
    return c
    }(E))
}
if(C("member_menu_profile")){
    var Ua,ic,vd,wd,Ha,xd,jc,yd,mb,kc,zd,i=function(d,c){
        return function(){
            return d.apply(c,arguments)
            }
        },D={}.hasOwnProperty,u=function(d,c){
    function b(){
        this.constructor=d
        }
        for(var e in c)D.call(c,e)&&(d[e]=c[e]);b.prototype=c.prototype;
    d.prototype=new b;
    d.__super__=c.prototype;
    return d
    };
    
mb=function(d){
    function c(){
        this.showMenu=
        i(this.showMenu,this);
        this.render=i(this.render,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.className="member";
    c.prototype.events={
        click:"showMenu"
    };
    
    c.prototype.initialize=function(){
        var b,c;
        this.model&&(this.enablePopupMenu=null!=(b=this.options.enablePopupMenu)?b:!0,this.options.goToBoardProfile&&(this.goToBoardProfile=!0),this.showStatus=null!=(c=this.options.showStatus)?c:!0,this.model.bind("change",this.render))
        };
        
    c.prototype.render=function(){
        var b,c,f,d=this;
        this.model?(J("render","rendering "+this.constructor.name+" "+this.model.get("fullName")),b=this.model.toJSON(),b.showStatus=this.showStatus,b["status_"+b.status]=!0,c=function(b){
            b=_.detect(b.get("memberships"),function(b){
                return b.idMember===d.model.id
                });
            return"admin"===(null!=b?b.memberType:void 0)
            },this.showBoardAdmin&&(b.isBoardAdmin=c(this.getBoard())),this.showOrganizationAdmin&&(b.isOrganizationAdmin=c(this.getOrganization()))):b={
            deleted:!0
            };
            
        $(this.el).html(t.fill("member",b));
        this.enablePopupMenu||
        $(this.el).addClass("no-menu");
        $(this.el).data("id",null!=(f=this.model)?f.id:void 0);
        return this
        };
        
    c.prototype.showMenu=function(b){
        var c;
        if((this.doClicks()&&this.enablePopupMenu||this.goToBoardProfile)&&this.model){
            m.stop(b);
            if(this.goToBoardProfile&&(c=this.getBoard())){
                this.model.viewBoardProfile(this.getBoard());
                return
            }
            this.options.goToProfile?Controller.memberProfileView(this.model.get("username")):(b=$(b.currentTarget).closest(".member,.inline-member-container"),v.toggle({
                elem:$(b)[0],
                top:b.hasClass("member")?
                35:16,
                view:this.getMenuView()
                }))
            }
        };
    
c.prototype.doClicks=function(){
    return!DragSort.sorting
    };
    
return c
}(E);
Ha=function(d){
    function c(){
        this.render=i(this.render,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.initialize=function(){
        c.__super__.initialize.apply(this,arguments);
        return this.model.bind("change",this.render)
        };
        
    c.prototype.getViewTitle=function(){
        return this.model.getMemberViewTitle()
        };
        
    c.prototype.displayType="miniprofile";
    c.prototype.delegateEvents=function(b){
        return c.__super__.delegateEvents.call(this,
            _.extend({
                "click .js-profile":"showProfile",
                "click .js-edit-profile":"editProfile",
                "click .js-view-large":"viewLarge",
                "click .js-change-av":"changeAvatar"
            },b||this.events))
        };
        
    c.prototype.render=function(){
        var b;
        b=this.model.toJSON();
        b.bioHtml=ga.textAsHtml(b.bio);
        b.isMe=this.model===z.me();
        $(this.el).html(t.fill("mini_profile",b,{},{
            member:t.member
            }));
        this.renderMenu();
        return this
        };
        
    c.prototype.showProfile=function(){
        n("Mini Profile","Click Profile")
        };
        
    c.prototype.editProfile=function(){
        n("Mini Profile",
            "Click Edit Profile");
        v.pushView({
            view:this.model.getView(ib)
            })
        };
        
    c.prototype.viewLarge=function(){
        n("Mini Profile","View Large Avatar");
        v.pushView({
            view:this.model.getView(wd)
            })
        };
        
    c.prototype.changeAvatar=function(){
        n("Mini Profile","Change Avatar");
        v.pushView({
            view:this.model.getView(hb)
            })
        };
        
    return c
    }(E);
wd=function(d){
    function c(){
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.getViewTitle=function(){
        return"Avatar"
        };
        
    c.prototype.displayType="avdetail";
    c.prototype.events={
        "click .js-profile":"showProfile"
    };
    c.prototype.render=function(){
        var b;
        b=this.model.toJSON();
        $(this.el).html(t.fill("member_large_avatar",b));
        return this
        };
        
    c.prototype.showProfile=function(){
        n("Mini Profile","Large Avatar - Click Profile")
        };
        
    return c
    }(E);
(function(d){
    function c(){
        this.getMenuView=i(this.getMenuView,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.getMenuView=function(){
        return this.model.getView(Ua,this.model.cid)
        };
        
    return c
    })(mb);
Ua=function(d){
    function c(){
        return c.__super__.constructor.apply(this,
            arguments)
        }
        u(c,d);
    c.prototype.renderMenu=function(){};
    
    return c
    }(Ha);
jc=function(d){
    function c(){
        this.getMenuView=i(this.getMenuView,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.getMenuView=function(){
        var b;
        b=this.options.parent;
        return this.model.getView(vd,"card_"+b.cid,{
            card:b
        })
        };
        
    return c
    }(mb);
vd=function(d){
    function c(){
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.events={
        "click .js-remove-member":"removeMember"
    };
    
    c.prototype.initialize=
    function(){
        c.__super__.initialize.apply(this,arguments);
        this.card=this.options.card
        };
        
    c.prototype.renderMenu=function(){
        $(this.el).append(t.fillMenu("member_on_card_menu",this.model.toJSON(),{
            editable:this.card.editable()
            }));
        return this
        };
        
    c.prototype.removeMember=function(){
        v.hide();
        this.card.removeMember(this.model.id)
        };
        
    return c
    }(Ha);
xd=function(d){
    function c(){
        this.getMenuView=i(this.getMenuView,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.showBoardAdmin=!0;
    c.prototype.getBoard=
    function(){
        return this.options.parent
        };
        
    c.prototype.getMenuView=function(){
        return this.model.getView(ic,"board",{
            board:this.options.parent
            })
        };
        
    return c
    }(mb);
yd=function(d){
    function c(){
        this.getMenuView=i(this.getMenuView,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.showOrganizationAdmin=!0;
    c.prototype.getOrganization=function(){
        return this.options.parent
        };
        
    c.prototype.getMenuView=function(){
        return this.model.getView(zd,"org",{
            organization:this.options.parent
            })
        };
        
    return c
    }(mb);
kc=function(d){
    function c(){
        this.changeRole=i(this.changeRole,this);
        this.removeMember=i(this.removeMember,this);
        this.renderMenu=i(this.renderMenu,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.events={
        "click .js-remove-member":"removeMember",
        "click .js-change-role":"changeRole"
    };
    
    c.prototype.renderMenu=function(){
        var b;
        b=_.extend(this.model.toJSON(),this.getExtraData(),this.model.getMembershipData(this.parent));
        $(this.el).append(t.fillMenu("member_on_board_or_org_menu",
            b,{
                editable:this.parent.editable()
                }));
        return this
        };
        
    c.prototype.getExtraData=function(){
        return{}
    };
    
c.prototype.removeMember=function(){
    v.hide();
    this.parent.memberList.remove(this.model);
    this.parent.api.removeMember(this.model.id)
    };
    
c.prototype.changeRole=function(){
    v.pushView({
        view:this.model.getView(id,"",{
            parent:this.parent
            })
        })
    };
    
return c
}(Ha);
zd=function(d){
    function c(){
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.className="organization-member-menu";
    c.prototype.initialize=
    function(){
        c.__super__.initialize.apply(this,arguments);
        this.parent=this.options.organization
        };
        
    return c
    }(kc);
ic=function(d){
    function c(){
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.className="board-member-menu";
    c.prototype.initialize=function(){
        c.__super__.initialize.apply(this,arguments);
        this.parent=this.options.board
        };
        
    c.prototype.getExtraData=function(){
        return{
            boardProfileUrl:Controller.getMemberBoardProfileUrl(this.model.get("username"),this.parent.id)
            }
        };
    
return c
}(kc)
}
if(C("card_filter")){
    var S,
    lc,i=function(d,c){
        return function(){
            return d.apply(c,arguments)
            }
        },D={}.hasOwnProperty,u=function(d,c){
    function b(){
        this.constructor=d
        }
        for(var e in c)D.call(c,e)&&(d[e]=c[e]);b.prototype=c.prototype;
    d.prototype=new b;
    d.__super__=c.prototype;
    return d
    };
    
S=new (function(){
    function d(){
        this.getNumCards=i(this.getNumCards,this);
        this.filterMyCards=i(this.filterMyCards,this);
        this.clearAllCardFilters=i(this.clearAllCardFilters,this);
        this.refreshFilters=i(this.refreshFilters,this);
        this.fQActive=!1;
        this.filterArray=
        []
        }
        d.prototype.refreshFilters=function(){
        var c,b,e,f,d,h,j;
        c=$("#board");
        if(0<c.length)return 0<this.filterArray.length?(c.addClass("filtering"),b=$(".list-card:not(.placeholder,.js-composer)"),e=[],f=[],h=[],$(".matched-card").removeClass("matched-card"),d=/[\s\x21-\x2F\x3A-\x40\x5B-\x60\x7B-\x7F]+/,this.filterArray.forEach(function(b){
            if(b.match(/^label-*/))return e.push(b.replace(/label-/,".")+"-label");
            if(b.match(/^member-*/))return f.push(b.replace(/member-/,".assigned-to-"));
            if(b.match(/^title-*/))return b=
                b.replace(/^title-/,"").toLowerCase(),h=_.compact(b.split(d))
                }),j=RegExp("^("+h.join("|")+")"),c=$(b).filter(function(c){
            c=_.compact($(b[c]).find("a.list-card-title").text().toLowerCase().split(d));
            return _.detect(c,function(b){
                return j.test(b)
                })
            }),e.length&&(c=c.filter(e.join())),f.length&&(c=c.filter(f.join())),c.addClass("matched-card"),$(".js-filter-cards").addClass("is-on"),this.getNumCards()):this.clearAllCardFilters()
            };
            
    d.prototype.clearAllCardFilters=function(){
        $("#board").removeClass("filtering");
        $(".matched-card").removeClass("matched-card");
        this.filterArray=[];
        $(".js-filter-cards").removeClass("is-on");
        $(".card-filter .js-filter-toggle.active").removeClass("active");
        $(".card-filter .js-filter-by-title").val("");
        O.newCards=[];
        $(".list-card.temp-show").removeClass("temp-show");
        return this.fQActive=!1
        };
        
    d.prototype.filterMyCards=function(){
        var c,b;
        b=z.me();
        c=$("#board");
        if(b&&c.length)return this.clearAllCardFilters(),c="member-"+b.get("username"),this.filterArray.push(c),S.refreshFilters(),
            $(".js-filter-cards").addClass("is-on"),this.getNumCards()
            };
            
    d.prototype.getNumCards=function(){
        var c,b;
        c=$("#board");
        if(0<c.length&&c.hasClass("filtering"))return b=$(".list"),b.each(function(c){
            var f,d,c=b[c];
            f=$(c).find(".list-card:not(.placeholder,.js-composer)").length;
            d="s";
            1===f&&(d="");
            return $(c).find(".num-cards").text(""+f+" card"+d)
            })
        };
        
    return d
    }());
$(S.init);
lc=function(d){
    function c(){
        this.useTranslucent=i(this.useTranslucent,this);
        this.useHidden=i(this.useHidden,this);
        this.toggleFilter=
        i(this.toggleFilter,this);
        this.filterByTitle=i(this.filterByTitle,this);
        this.render=i(this.render,this);
        this.initialize=i(this.initialize,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.getViewTitle=function(){
        return"Search and Filter Cards"
        };
        
    c.prototype.initialize=function(){
        return this.model.bind("change:labelNames",this.render)
        };
        
    c.prototype.events={
        "click .js-filter-toggle":"toggleFilter",
        "click .js-use-hidden":"useHidden",
        "click .js-use-translucent":"useTranslucent"
    };
    c.prototype.render=function(){
        var b,c,f,d,h=this;
        b=$("#board");
        f=[];
        d=[];
        c=this.model.toJSON({
            labelNames:!0
            });
        c.searchTerms="";
        S.filterArray.forEach(function(b){
            if(b.match(/^label-*/))return f.push(b);
            if(b.match(/^member-*/))return b=b.replace(/member-/,""),d.push(b);
            if(b.match(/^title-*/))return c.searchTerms=b.replace(/title-/,"")
                });
        c.boardMems=[];
        this.model.memberList.models.forEach(function(b){
            b=b.toJSON();
            _.include(d,b.username)&&(b.activeFilter=!0);
            c.boardMems.push(b)
            });
        b.hasClass("translucent-filter")?
        c.translucentfilter=!0:c.hiddenfilter=!0;
        f.forEach(function(b){
            "label-green"===b&&(c.activeGreen=!0);
            "label-yellow"===b&&(c.activeYellow=!0);
            "label-orange"===b&&(c.activeOrange=!0);
            "label-red"===b&&(c.activeRed=!0);
            "label-purple"===b&&(c.activePurple=!0);
            if("label-blue"===b)return c.activeBlue=!0
                });
        $(this.el).html(t.fill("filter_cards",c,{},{
            member:t.member
            }));
        _.delay(function(){
            return $(h.el).find(".js-filter-by-title").keyup(_.debounce(h.filterByTitle,300))
            },20);
        return this
        };
        
    c.prototype.filterByTitle=
    function(b){
        var c;
        b.keyCode!==oa&&(b=$(".js-filter-by-title").val(),c=[],S.filterArray.forEach(function(b){
            if(b.match(/^label-*/)||b.match(/^member-*/))return c.push(b)
                }),S.filterArray=c,b&&S.filterArray.push("title-"+b),S.refreshFilters())
        };
        
    c.prototype.toggleFilter=function(b){
        var c;
        m.stop(b);
        b=$(b.target).closest(".js-filter-toggle");
        b.hasClass("active")?b.removeClass("active"):b.addClass("active");
        b.hasClass("filter-label-toggle")&&(c="label-"+$(b).attr("attr"),_.include(S.filterArray,c)?S.filterArray=
            _.without(S.filterArray,c):S.filterArray.push(c));
        b.hasClass("filter-member-toggle")&&(c="member-"+$(b).attr("attr"),_.include(S.filterArray,c)?S.filterArray=_.without(S.filterArray,c):S.filterArray.push(c));
        b.hasClass("js-clear-all")&&(S.filterArray=[]);
        S.refreshFilters()
        };
        
    c.prototype.useHidden=function(b){
        m.stop(b);
        b=$(b.target).closest(".js-use-hidden");
        $("#board").removeClass("translucent-filter");
        $(this.el).find(".display-options a").removeClass("active");
        b.addClass("active");
        S.getNumCards()
        };
    c.prototype.useTranslucent=function(b){
        m.stop(b);
        b=$(b.target).closest(".js-use-translucent");
        $("#board").addClass("translucent-filter");
        $(this.el).find(".display-options a").removeClass("active");
        b.addClass("active");
        S.getNumCards()
        };
        
    return c
    }(N)
}
if(C("board")){
    var Ia,xb,mc,Ad,ud,lb,Va,Bd,nb,Cd,Dd,nc,Yb,hc,Ed,Fd,Gd,Hd,oc,Id,i=function(d,c){
        return function(){
            return d.apply(c,arguments)
            }
        },D={}.hasOwnProperty,u=function(d,c){
    function b(){
        this.constructor=d
        }
        for(var e in c)D.call(c,e)&&(d[e]=c[e]);b.prototype=
    c.prototype;
    d.prototype=new b;
    d.__super__=c.prototype;
    return d
    },aa=[].indexOf||function(d){
    for(var c=0,b=this.length;c<b;c++)if(c in this&&this[c]===d)return c;return-1
    };
    
xb=function(d){
    function c(){
        this.getCheckItem=i(this.getCheckItem,this);
        this.getBoardInvitation=i(this.getBoardInvitation,this);
        this.getChecklist=i(this.getChecklist,this);
        this.getUrl=i(this.getUrl,this);
        this.getList=i(this.getList,this);
        this.getCard=i(this.getCard,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.typeName="Board";
    c.prototype.initialize=function(){
        Api.init(this)
        };
        
    c.prototype.postInitialize=function(){
        var b,c=this;
        this.listList=new Jd(this.get("lists")||[],{
            model:this
        });
        this.boardInvitationList=new fd(this.get("invitations")||[],{
            model:this
        });
        this.checklistList=new pc([],{
            model:this
        });
        this.memberList=new jb;
        b=function(){
            c.memberList.refresh(Models.Member.getList(_.pluck(c.get("memberships"),"idMember")||[]),{
                model:c
            })
            };
            
        this.bind("change:memberships",b);
        b();
        this.bind("change:lists",
            function(){
                c.listList.refresh(c.get("lists")||[],{
                    model:c
                })
                });
        b=function(){
            c.checklistList.refresh(c.get("checklists")||[],{
                model:c
            })
            };
            
        b();
        this.bind("change:checklists",b);
        b=function(){
            return c.organization=Models.Organization.get(c.get("idOrganization"))
            };
            
        this.bind("change:idOrganization",b);
        b();
        this.checklistList.each(function(b){
            Models.finishInit(b);
            b.checkItemList.each(function(b){
                Models.finishInit(b)
                })
            });
        this.listList.each(function(b){
            Models.finishInit(b)
            });
        this.listList.each(function(b){
            b.cardList.each(function(b){
                Models.finishInit(b)
                })
            });
        this.setReady()
        };
        
    c.prototype.close=function(){
        this.set({
            closed:!0
            });
        this.save()
        };
        
    c.prototype.reopen=function(){
        this.set({
            closed:!1
            });
        this.save()
        };
        
    c.prototype.toJSON=function(b){
        var e;
        null==b&&(b={});
        e=c.__super__.toJSON.apply(this,arguments);
        b.org&&null!=this.organization&&(e.hasOrg=!0,e.org=this.organization.toJSON({
            url:!0
            }));
        b.url&&(e.url=Controller.getBoardUrl(this));
        b.pinned&&(e.pinned=this.isPinned());
        return e
        };
        
    c.prototype.calcPos=function(b,c){
        return m.calcPos(b,this.listList,c,function(b){
            return!b.get("closed")
            })
        };
    c.prototype.getCard=function(b){
        return m.isShortId(b)?Models.Card.find("idShort",Number(b))[0]:Models.Card.get(b)
        };
        
    c.prototype.getList=function(b){
        return this.listList.get(b)
        };
        
    c.prototype.getUrl=function(){
        return Controller.getBoardUrl(this)
        };
        
    c.prototype.getChecklist=function(b){
        return this.checklistList.get(b)
        };
        
    c.prototype.getBoardInvitation=function(b){
        return this.boardInvitationList.get(b)
        };
        
    c.prototype.getCheckItem=function(b){
        var c,f,d,h,j;
        h=this.checklistList.models;
        for(f=0,d=h.length;f<d;f++)if(c=
            h[f],c=null!=c?null!=(j=c.checkItemList)?j.get(b):void 0:void 0)return c
            };
            
    c.prototype.editable=function(){
        var b;
        return(b=z.me())&&this.editableByMember(b)
        };
        
    c.prototype.editableByMember=function(b){
        return this.isMember(b)
        };
        
    c.prototype.isMember=function(b){
        var c;
        return"normal"===(c=this.getMemberType(b))||"admin"===c
        };
        
    c.prototype.invited=function(){
        var b;
        return(b=z.me())&&this.isMemberInvited(b)
        };
        
    c.prototype.isMemberInvited=function(b){
        return"invited"===this.getMemberType(b)
        };
        
    c.prototype.owned=function(){
        var b;
        return(b=z.me())&&this.ownedByMember(b)
        };
        
    c.prototype.ownedByMember=function(b){
        return"admin"===this.getMemberType(b)
        };
        
    c.prototype.canJoin=function(){
        var b,c,f;
        return(null!=(b=this.get("prefs"))?b.selfJoin:void 0)&&(null!=(c=this.organization)?c.isMember(z.me()):void 0)&&(f=this.id,0>aa.call(z.me().get("idBoards"),f))
        };
        
    c.prototype.canInviteMembers=function(){
        var b,c,f;
        if("owners"===(null!=(c=this.get("prefs"))?c.invitations:void 0))b="admin";
        else if("members"===(null!=(f=this.get("prefs"))?f.invitations:
            void 0))b="normal";
        return"admin"===this.getMemberType(z.me())||b===this.getMemberType(z.me())
        };
        
    c.prototype.getMemberType=function(b){
        return MemberOwner.getMemberType.call(this,b)
        };
        
    c.prototype.compareMemberType=function(b,c,f){
        return m.compareMemberType(this,b,c,f)
        };
        
    c.prototype.isMemberPublic=function(b){
        return"public"===this.getMemberType(b)
        };
        
    c.prototype.isMemberOrg=function(b){
        return"org"===this.getMemberType(b)
        };
        
    c.prototype.memberMatchesSetting=function(b,c){
        switch(this.getPref(c)){
            case "public":
                return z.isLoggedIn();
            case "org":
                return this.isMember(b)||this.isMemberOrg(b);
            case "members":
                return this.isMember(b);
            case "owners":
                return this.ownedByMember(b);
            default:
                return!1
                }
            };
    
c.prototype.canVote=function(b){
    return this.memberMatchesSetting(b,"voting")
    };
    
c.prototype.canComment=function(b){
    return this.memberMatchesSetting(b,"comments")
    };
    
c.prototype.canInvite=function(b){
    return this.memberMatchesSetting(b,"invitations")
    };
    
c.prototype.prefNames=["permissionLevel","voting","comments","invitations","selfJoin"];
c.prototype.myPrefNames=
["showSidebar","showSidebarMembers","showSidebarBoardActions","showSidebarActivity","showListGuide"];
c.prototype.myPrefDefaults={
    showListGuide:!1
    };
    
c.prototype.getLabelName=function(b){
    var c;
    c=this.get("labelNames");
    return(null!=c?c[b]:void 0)||""
    };
    
c.prototype.isPublic=function(){
    return"public"===this.getPref("permissionLevel")
    };
    
c.prototype.isPartiallyLoaded=function(){
    var b,c,f,d;
    d=["memberships","lists"];
    for(c=0,f=d.length;c<f;c++)if(b=d[c],null==this.get(b))return!0;return this.get("invited")?!0:
    !1
    };
    
c.prototype.pin=function(b){
    var c;
    null==b&&(b=!0);
    c=z.me();
    b?c.addToSet("idBoardsPinned",this.id):c.pull("idBoardsPinned",this.id);
    c.save()
    };
    
c.prototype.isPinned=function(){
    var b;
    return z.isLoggedIn()&&(b=this.id,0<=aa.call(z.me().get("idBoardsPinned"),b))
    };
    
c.prototype.responseToInvite=function(b,c){
    var f;
    f=z.me();
    return f.api.respondToInvitation({
        accepted:b,
        idModel:this.id,
        token:$.cookie("invite-token-"+this.id),
        modelType:"Board"
    },function(d){
        b&&(f.set({
            idBoards:d.idBoards,
            idBoardsInvited:d.idBoardsInvited
            }),
        f.save());
        "function"===typeof c&&c()
        })
    };
    
c.prototype.acceptInvite=function(b){
    return this.responseToInvite(!0,b)
    };
    
c.prototype.rejectInvite=function(b){
    return this.responseToInvite(!1,b)
    };
    
c.prototype.getInviteToken=function(){
    return $.cookie("invite-token-"+this.id)
    };
    
c.prototype.getIdBoardMems=function(){
    return _.map(this.memberList.models,function(b){
        return b.id
        })
    };
    
return c
}(dd);
lb=function(d){
    function c(){
        this.sync=i(this.sync,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.model=
    xb;
    c.prototype.initialize=function(){
        this.bind("change:name",this.sort)
        };
        
    c.prototype.comparator=function(b){
        var c;
        c=b.organization||Models.Organization.get(b.get("idOrganization"));
        c=(null!=c?c.get("displayName"):void 0)||"";
        b=b.get("name")||"";
        return m.rpad(c,64).toUpperCase()+b.toUpperCase()
        };
        
    c.prototype.sync=function(b,c,f){
        f(Models.Board.all())
        };
        
    return c
    }(wa);
Cd=function(d){
    function c(){
        this.openBoardMenuSidebar=i(this.openBoardMenuSidebar,this);
        this.viewAllActivityList=i(this.viewAllActivityList,
            this);
        this.viewAllActivityHeader=i(this.viewAllActivityHeader,this);
        this.openManageMembers=i(this.openManageMembers,this);
        this.signupAndJoinPopover=i(this.signupAndJoinPopover,this);
        this.joinBoard=i(this.joinBoard,this);
        this.rejectInvite=i(this.rejectInvite,this);
        this.acceptInvite=i(this.acceptInvite,this);
        this.showWidgetVisibility=i(this.showWidgetVisibility,this);
        this.showCardFilter=i(this.showCardFilter,this);
        this.dblClickAddListMenu=i(this.dblClickAddListMenu,this);
        this.addListPopover=i(this.addListPopover,
            this);
        this.openDesc=i(this.openDesc,this);
        this.openBoardMenuTitle=i(this.openBoardMenuTitle,this);
        this.openBoardMenuIcon=i(this.openBoardMenuIcon,this);
        this.sortStop=i(this.sortStop,this);
        this.renderMembers=i(this.renderMembers,this);
        this.showDesktopNotification=i(this.showDesktopNotification,this);
        this.allowDesktopNotifications=i(this.allowDesktopNotifications,this);
        this.renderActions=i(this.renderActions,this);
        this.renderLists=i(this.renderLists,this);
        this.renderPermissionLevel=i(this.renderPermissionLevel,
            this);
        this.renderName=i(this.renderName,this);
        this.render=i(this.render,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.className="board-wrapper";
    c.prototype.events={
        sortstop:"sortStop",
        "click .js-allow-notifications":"allowDesktopNotifications",
        "click .js-open-board-menu-icon":"openBoardMenuIcon",
        "click .js-open-board-menu-title":"openBoardMenuTitle",
        "click .js-open-desc":"openDesc",
        "click .js-board-widget-vis":"showWidgetVisibility",
        "click .js-show-all-widgets":"showWidgetVisibility",
        "click .js-accept-invite":"acceptInvite",
        "click .js-reject-invite":"rejectInvite",
        "click .js-join-board":"joinBoard",
        "click .js-signup-and-join":"signupAndJoinPopover",
        "click .js-open-manage-board-members":"openManageMembers",
        "click .js-open-board-menu-sidebar":"openBoardMenuSidebar",
        "click .js-add-list-popover":"addListPopover",
        "click .js-filter-cards":"showCardFilter",
        "click .js-view-all-activity-header":"viewAllActivityHeader",
        "click .js-view-all-activity-list":"viewAllActivityList",
        "dblclick #board":"dblClickAddListMenu"
    };
    c.prototype.initialize=function(){
        var b,c,f,d=this;
        this.model.view=this;
        this.model.bind("change:closed",this.render).bind("change:name",this.renderName).bind("change:prefs",this.renderPermissionLevel).bind("change:myPrefs",this.render).bind("change:idOrganization",this.renderName).bind("change:memberships",this.renderPermissionLevel);
        null!=this.model.organization&&this.model.organization.bind("change:name",this.renderName);
        b=_.debounce(this.renderLists,120);
        this.model.listList.bind("change:closed",
            b).onAddRemove(b);
        this.model.memberList.bind("change:status",this.renderMembers).onAddRemove(this.renderMembers);
        Models.Action.bind("pushadd:"+this.model.id,this.showDesktopNotification).bind("add:"+this.model.id,_.debounce(this.renderActions,20)).bind("remove:"+this.model.id,_.debounce(this.renderActions,20));
        z.isLoggedIn()&&(c=z.me(),f=this.model.isMember(c),c.boardList.onAddRemove(function(){
            var b;
            b=null!=c.boardList.get(d.model.id)||d.model.isMember(c);
            if(b!==f)d.render();
            else if(!(b||d.model.isMemberInvited(c)||
                null!=d.model.organization&&_.detect(d.model.organization.memberList.models,function(b){
                    return b.id===c.id
                    })&&"org"===d.model.get("prefs").permissionLevel)&&"public"!==d.model.get("prefs").permissionLevel)return Controller.displayErrorPage({
                errorType:"boardNotFound"
            })
            }))
        };
        
    c.prototype.render=function(){
        var b,c,f,d,h,j,i,o,q,m=this;
        j=this;
        f=j.model;
        b=$(j.el);
        this.cardComposerState={
            pos:{
                idBoard:f.id,
                idList:null,
                cardPos:null
            },
            members:[],
            labels:[],
            title:null,
            vis:!1
            };
            
        d={
            editable:f.editable(),
            owned:f.owned(),
            invited:f.invited()
            };
            
        if(f.get("closed"))b.html(t.fill("board_closed",f.toJSON(),d));
        else{
            c=f.toJSON();
            c.url=Controller.getBoardUrl(this.model);
            q=f.prefNames.concat(f.myPrefNames);
            for(i=0,o=q.length;i<o;i++)h=q[i],c[""+h+"_"+f.getPref(h)]=!0;
            c.canJoin=f.canJoin();
            c.canInviteMembers=f.canInviteMembers();
            b.css({
                "margin-top":"100000px"
            });
            b.html(t.fill("board",c,d));
            _.defer(function(){
                return O.calc_board()
                });
            _.defer(function(){
                return j.renderName().renderLists().renderMembers().renderActions().renderPermissionLevel()
                });
            _.delay(function(){
                ListGuide.calcVisLists();
                R.calc_surface();
                return $(m.el).find(".list-area-wrapper:first").dragscrollable({
                    fxIgnore:function(c){
                        var e;
                        b=$(c.target).closest("#board");
                        e=c.offsetY>b.height()-30;
                        c=0<$(c.target).closest(".list").length;
                        return e||c
                        }
                    })
            },1500)
        }
        return this
    };
    
c.prototype.renderName=function(){
    var b,c;
    b=this.model;
    c=b.get("name");
    null!=b.organization?(b=$("<a>").attr("href","/"+b.organization.get("name")).text(""+b.organization.get("displayName")),$(this.el).find(".org-name").html(b)):
    $(this.el).find(".org-name").empty();
    $(this.el).find("#board-header .js-board-title").text(c);
    Controller.setLocation({
        title:c
    });
    return this
    };
    
c.prototype.renderPermissionLevel=function(){
    var b,c,f;
    c=$(this.el).find("#permission-level");
    f=this.model.getPref("permissionLevel");
    b={};
    
    "private"===f?b={
        permissionLevel:"private",
        altText:"This board is private. It's only viewable to members of this board."
    }:"public"===f?b={
        permissionLevel:"public",
        altText:"This board is public. It's viewable to the entire Internet."
    }:
    "org"===f&&(b={
        permissionLevel:"org-private",
        altText:"This board is only viewable to members of the organization."
    });
    c.html(t.fill("board_permissions",b));
    b=this.model.canInvite(z.me());
    $(this.el).find(".js-manage-board-members").toggle(b);
    !b&&"board-member-modal"===F.getViewName()&&F.hide();
    return this
    };
    
c.prototype.renderLists=function(){
    var b,c;
    b=$(this.el).find(".list-area");
    c=$(this.el).find(".list-area-wrapper");
    O.saveScrolls();
    (WindowSize.fLarge||WindowSize.fExtraLarge)&&O.fHorizScroll&&c.css({
        "margin-top":"+=10000"
    });
    b.empty();
    this.model.listList.forEach(function(c){
        c.get("closed")||(c=c.getView(ob),b.append(c.render().el))
        });
    (WindowSize.fLarge||WindowSize.fExtraLarge)&&_.defer(function(){
        O.calcLists();
        return O.restoreScrolls()
        });
    _.defer(function(){
        $(".board-wrapper").css({
            "margin-top":"0"
        });
        return c.css({
            "margin-top":"0"
        })
        });
    DragSort.refresh();
    return this
    };
    
c.prototype.renderActions=function(){
    var b;
    b=$(this.el).find(".js-sidebar-list-actions");
    (new Da(Models.Action.getListForModel(this.model))).renderTo(b,{
        limit:10,
        key:this.model.id,
        model:this.model,
        excludeTypes:["copyCommentCard"]
        });
    $(this.el).find(".js-allow-notifications").toggle(DesktopNotifications.notEnabled());
    return this
    };
    
c.prototype.allowDesktopNotifications=function(b){
    var c;
    m.preventDefault(b);
    n("Board Sidebar","Allow Desktop Notifications");
    c=this;
    DesktopNotifications.requestPermission(function(){
        c.renderActions()
        })
    };
    
c.prototype.showDesktopNotification=function(b){
    var c,f,d,h,j,i,o,q,m,n,s;
    if(null!=b&&(h=U.parse(b.get("date")),o=function(){
        var c;
        return _.detect(Models.Action.getListForModel("Card",null!=(c=b.get("data").card)?c.id:void 0),function(b){
            var c,e;
            c=U.parse(b.get("date"));
            return z.isMe(b.get("idMemberCreator"))&&12E5>h-c&&("commentCard"===(e=b.get("type"))||"createCard"===e)
            })
        },c=(new qc).getEntityLists([b],{})[0])){
        c.member=c.entities[0];
        c.entities=c.entities.slice(1);
        n=c.entities;
        for(q=0,m=n.length;q<m;q++)j=n[q],j[j.type+"Type"]=!0,"comment"===j.type&&(i={
            convertNewlines:!0
            },j.html=ga.textAsHtml(j.text,i));
        if("commentCard"===
            b.get("type")&&!z.isMe(b.get("idMemberCreator"))&&(z.me().hasAtMe(b.get("data").text)||o()))d=this.model.getCard(null!=(s=b.get("data").card)?s.id:void 0),f=this.model,DesktopNotifications.notify(c.db_id,{
            html:t.fill("desktop_notification",c,{},{
                entity:t.entity
                }),
            close:function(b){
                b&&null!=d&&d.addComment(b)
                },
            click:function(){
                d&&f&&Controller.displayBoard({
                    board:f,
                    idCard:d.id
                    })
                }
            })
        }
    };

c.prototype.renderMembers=function(){
    return MemberOwner.renderMembers.call(this,".js-list-board-members",xd)
    };
    
c.prototype.sortStop=
function(b,c){
    m.stopPropagation(b);
    boardView.escCancel?boardView.escCancel=!1:c.item.trigger("movelist",[c])
    };
    
c.prototype.openBoardMenuIcon=function(b){
    m.stop(b);
    n("Board Header","Open Board Menu","Icon");
    v.toggle({
        elem:$(".js-open-board-menu-icon")[0],
        top:32,
        view:this.model.getView(Wa)
        })
    };
    
c.prototype.openBoardMenuTitle=function(b){
    m.stop(b);
    n("Board Header","Open Board Menu","Title");
    v.toggle({
        elem:$(".js-open-board-menu-icon")[0],
        top:35,
        view:this.model.getView(Wa)
        })
    };
    
c.prototype.openDesc=function(b){
    m.stop(b);
    n("Board Header","Edit Description");
    F.show({
        view:this.model.getView(mc),
        displayType:"slim"
    })
    };
    
c.prototype.addListPopover=function(b){
    m.stop(b);
    n("Board Sidebar","Open Add List Menu");
    v.toggle({
        elem:b.target,
        top:35,
        view:this.model.getView(Ia,"default")
        })
    };
    
c.prototype.dblClickAddListMenu=function(b){
    m.stop(b);
    this.model.isMember(z.me())&&(n("Board","Open Add List Menu - From Double Click"),v.toggle({
        clientx:b.clientX,
        clienty:b.clientY,
        top:35,
        view:this.model.getView(Ia,"dblClick",{
            dblClick:!0
            })
        }))
    };
c.prototype.showCardFilter=function(b){
    m.stop(b);
    n("Board Sidebar","Open Search and Filter Menu");
    b=$(".js-filter-cards").is(":visible")?$(".js-filter-cards")[0]:$(".js-show-all-widgets")[0];
    v.toggle({
        elem:b,
        top:35,
        view:this.model.getView(lc)
        })
    };
    
c.prototype.showWidgetVisibility=function(b){
    var c;
    m.stop(b);
    n("Board Sidebar","Open Widget Visibility Menu");
    c=$(b.target).attr("name");
    v.toggle({
        elem:b.target,
        top:23,
        view:this.model.getView(Dd,c,{
            settingName:c
        })
        })
    };
    
c.prototype.acceptInvite=function(b){
    m.preventDefault(b);
    n("Board Sidebar","Accept Board Invite");
    $(this.el).find(".js-accept-invite").attr("disabled","disabled");
    this.model.acceptInvite(function(){
        return y.location.reload()
        });
    return!1
    };
    
c.prototype.rejectInvite=function(b){
    m.preventDefault(b);
    n("Board Sidebar","Reject Board Invite");
    this.model.rejectInvite(function(){
        return y.location.reload()
        });
    return!1
    };
    
c.prototype.joinBoard=function(b){
    var c=this;
    n("Board Sidebar","Join Board");
    m.preventDefault(b);
    z.me().api.addToBoard({
        idBoard:this.model.id
        },function(){
        c.render();
        return _.defer(function(){
            return $(c.el).find(".board-widget .js-join-board").closest(".board-widget").remove()
            })
        });
    this.model.memberList.add(z.me());
    return!1
    };
    
c.prototype.signupAndJoinPopover=function(b){
    m.stop(b);
    n("Board Sidebar","Open Sign Up and Join Popover");
    v.toggle({
        elem:b.target,
        top:40,
        view:this.model.getView(Id)
        })
    };
    
c.prototype.openManageMembers=function(b){
    var c;
    m.stop(b);
    n("Board Sidebar","Open Add Members");
    c=this.model.getView(ya);
    c.getOrgData();
    v.toggle({
        elem:$(b.target).closest(".js-open-manage-board-members")[0],
        top:35,
        view:c
    })
    };
    
c.prototype.viewAllActivityHeader=function(){
    n("Board Sidebar","View All Board Activity","From Widget Header");
    F.show({
        view:this.model.getView(Ab),
        displayType:"slim"
    })
    };
    
c.prototype.viewAllActivityList=function(){
    n("Board Sidebar","View All Board Activity","From End of List");
    F.show({
        view:this.model.getView(Ab),
        displayType:"slim"
    })
    };
    
c.prototype.openBoardMenuSidebar=function(b){
    m.stop(b);
    n("Board Sidebar","Open Board Menu");
    v.toggle({
        elem:$(".js-open-board-menu-sidebar")[0],
        top:35,
        view:this.model.getView(Wa)
        })
    };
    
return c
}(E);
Id=function(d){
    function c(){
        this.setAutoAccept=i(this.setAutoAccept,this);
        this.render=i(this.render,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.getViewTitle=function(){
        return"Create New Account"
        };
        
    c.prototype.events={
        "click .js-google-confirm-account":"setAutoAccept",
        "click .js-confirm-email-account":"setAutoAccept"
    };
    
    c.prototype.render=function(){
        var b;
        b={
            email:$.cookie("email"),
            returnUrl:Controller.getBoardUrl(this.model)
            };
        $(this.el).html(t.fill("popover_signup",b));
        return this
        };
        
    c.prototype.setAutoAccept=function(){
        return $.cookie("accept-board-invite-"+this.model.id,"1",{
            expires:1,
            path:"/"
        })
        };
        
    return c
    }(N);
Ia=function(d){
    function c(){
        this.cancel=i(this.cancel,this);
        this.addList=i(this.addList,this);
        this.renderValue=i(this.renderValue,this);
        this.updateListList=i(this.updateListList,this);
        this.getClosestListPos=i(this.getClosestListPos,this);
        this.render=i(this.render,this);
        return c.__super__.constructor.apply(this,arguments)
        }
    u(c,d);
    c.prototype.getViewTitle=function(){
        return"Add List"
        };
        
    c.prototype.events={
        "change .js-select-list-pos":"renderValue",
        "click .js-add-list":"addList",
        "submit form":"addList",
        "click .js-cancel":"cancel"
    };
    
    c.prototype.getLists=function(){
        var b,c,f,d,h;
        d=this.model.listList.models;
        h=[];
        for(c=0,f=d.length;c<f;c++)b=d[c],b.get("closed")||h.push(b);
        this.lists=h;
        return this.listsLength=this.lists.length+1
        };
        
    c.prototype.render=function(){
        var b=this;
        $(this.el).html(t.fill("popover_add_list"));
        _.delay(function(){
            b.options.dblClick&&
            b.getClosestListPos();
            b.getLists();
            return b.updateListList()
            },10);
        return this
        };
        
    c.prototype.getClosestListPos=function(){
        var b,c;
        b=$(".list");
        c=[];
        this.closestListIdx=0;
        b.each(function(f){
            f=parseInt(Math.abs($(b[f]).offset().left+$(b[f]).width()/2-v.el_left),10);
            return c.push(f)
            });
        this.closestListIdx=_.indexOf(c,_.min(c));
        if(v.el_left>$(b[this.closestListIdx]).offset().left+$(b[this.closestListIdx]).width()/2)return this.closestListIdx+=1
            };
            
    c.prototype.updateListList=function(){
        var b,c,f,d;
        c=$(this.el).find(".js-select-list-pos");
        for(b=f=0,d=this.listsLength;0<=d?f<d:f>d;b=0<=d?++f:--f)$("<option>").val(b).text(b+1).appendTo(c);
        b=c.find("option:last");
        this.options.dblClick&&(b=c.find("option:eq("+this.closestListIdx+")"));
        b.attr("selected","selected");
        return this.renderValue()
        };
        
    c.prototype.renderValue=function(){
        var b;
        b=parseInt($(this.el).find(".js-select-list-pos").val(),10)+1;
        $(".js-pos-value").text(m.getNaturalNumber(""+b))
        };
        
    c.prototype.addList=function(b){
        var c,f,d,h,j=this;
        m.stop(b);
        d=$(this.el).find(".js-list-name").val();
        b=$(this.el).find(".js-select-list-pos");
        h=parseInt(b.find("option:selected").val(),10);
        f=h===this.listsLength-1?!1:!0;
        c="List"===d?!1:!0;
        v.hide();
        _.defer(function(){
            return j.model.listList.create({
                name:d,
                pos:j.model.calcPos(h),
                closed:!1
                },{
                success:function(b){
                    j.model.listList.remove(b,{
                        silent:!0
                        });
                    return c&&f?n("Board","Add List Menu","Successfully Add List - Changed Name, Changed Position"):c?n("Board","Add List Menu","Successfully Add List - Changed Name, Default Position"):f?n("Board","Add List Menu",
                        "Successfully Add List - Default Name, Changed Position"):n("Board","Add List Menu","Successfully Add List - Default Name, Default Position")
                    }
                })
        })
    };
    
c.prototype.cancel=function(b){
    m.stop(b);
    v.hide();
    n("Board","Add List Menu","Click Cancel Button")
    };
    
return c
}(N);
mc=function(d){
    function c(){
        this.render=i(this.render,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.initialize=function(){
        this.model.bind("change:name",this.render);
        this.model.bind("change:desc",this.render)
        };
    c.prototype.events={
        "click .js-edit-desc":"editDesc"
    };
    
    c.prototype.render=function(){
        var b,c,f;
        b=this.model.toJSON();
        c=this.model.get("desc");
        b.hasDesc=!!c;
        f={
            editable:this.model.editable(),
            owned:this.model.owned()
            };
            
        $(this.el).html(t.fill("board_desc",b,f));
        b.hasDesc&&$(this.el).find(".board-description>div.current").html(ga.markdownAsHtml(c));
        return this
        };
        
    c.prototype.editDesc=function(b){
        m.stop(b);
        this.edit("desc")
        };
        
    return c
    }(N);
Dd=function(d){
    function c(){
        this.hideAllWidgets=i(this.hideAllWidgets,
            this);
        this.showWidget=i(this.showWidget,this);
        this.hideWidget=i(this.hideWidget,this);
        this.render=i(this.render,this);
        this.initialize=i(this.initialize,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.getViewTitle=function(){
        return"Show Widgets"
        };
        
    c.prototype.initialize=function(){
        this.settingName=this.options.settingName;
        return this.model.bind("change:myPrefs",this.render)
        };
        
    c.prototype.events={
        "click .js-hide":"hideWidget",
        "click .js-show":"showWidget",
        "click .js-hide-all":"hideAllWidgets"
    };
    c.prototype.render=function(){
        var b;
        b={
            visible:this.model.getPref(this.settingName),
            isShowAll:"showSidebar"===this.settingName
            };
            
        $(this.el).html(t.fillMenu("board_widget_menu",b));
        return this
        };
        
    c.prototype._commitPref=function(b,c){
        var f=this;
        v.hide();
        _.defer(function(){
            f.model.setPref(b,c);
            return f.model.save()
            })
        };
        
    c.prototype.hideWidget=function(){
        this._commitPref(this.settingName,!1)
        };
        
    c.prototype.showWidget=function(){
        this._commitPref(this.settingName,!0)
        };
        
    c.prototype.hideAllWidgets=function(){
        this._commitPref("showSidebar",
            !1)
        };
        
    return c
    }(E);
oc=function(d){
    function c(){
        this.exportJSON=i(this.exportJSON,this);
        this.printModel=i(this.printModel,this);
        this.cancel=i(this.cancel,this);
        this.focusInput=i(this.focusInput,this);
        this.render=i(this.render,this);
        this.initialize=i(this.initialize,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.getViewTitle=function(){
        return"Share, Print, and Export"
        };
        
    c.prototype.initialize=function(){
        return this.modelType=this.model.typeName.toLowerCase()
        };
        
    c.prototype.events=

    {
        "click .js-print":"printModel",
        "click .js-export-json":"exportJSON",
        "click input[type='text']":"focusInput",
        "submit form":"cancel"
    };
    
    c.prototype.render=function(){
        var b,c,f,d,h,j=this;
        c={};
        
        c.object=this.modelType;
        c.jsonURL="/"+this.model.typeName.toLowerCase()+"/"+this.model.id+"/"+m.makeSlug(this.model.get("name"))+".json";
        b="card"===c.object?this.model.board:this.model;
        f=b.get("prefs").permissionLevel;
        "org"===f&&(c.orgName=null!=(d=null!=(h=b.organization)?h.get("displayName"):void 0)?d:"the organization it belongs to");
        "private"===f&&(c["private"]=!0);
        "org"===f&&(c.org=!0);
        "public"===f&&(c["public"]=!0);
        $(this.el).html(t.fill("popover_share",c));
        $(this.el).find(".js-url").text("Retrieving...");
        (function(b){
            return j.model.api.getShortLink({},function(c){
                return b(null,c)
                },function(c){
                return b(c)
                })
            })(function(b,c){
            return $(j.el).find(".js-url").val(b?"Error!":c).focus().select()
            });
        return this
        };
        
    c.prototype.focusInput=function(b){
        $(b.target).focus().select();
        return!1
        };
        
    c.prototype.cancel=function(b){
        m.stop(b);
        return!1
        };
    c.prototype.printModel=function(b){
        m.stop(b);
        "board"===this.modelType?(n("Share, Print, and Export Menu","Print","Board"),F.hide(),v.hide()):n("Share, Print, and Export Menu","Print","Card");
        _.defer(function(){
            return y.print()
            })
        };
        
    c.prototype.exportJSON=function(){
        return"board"===this.modelType?n("Share, Print, and Export Menu","Export JSON","Board"):n("Share, Print, and Export Menu","Export JSON","Card")
        };
        
    return c
    }(E);
Bd=function(d){
    function c(){
        this.render=i(this.render,this);
        return c.__super__.constructor.apply(this,
            arguments)
        }
        u(c,d);
    c.prototype.tagName="li";
    c.prototype.initialize=function(){
        return this.model.bind("change:actionCount",this.render)
        };
        
    c.prototype.events={
        click:"openBoard"
    };
    
    c.prototype.render=function(){
        var b,c;
        b=this.model.toJSON();
        b.url=Controller.getBoardUrl(this.model);
        b.orgName=this.model.organization?this.model.organization.get("displayName"):void 0;
        b.current=Controller.onBoardView(this.model.id);
        c=this.model.get("actionCount");
        0<c&&(b.unreadActionsCount=100<c?"100+":c);
        $(this.el).html(t.fill("board_menu_item",
            b));
        return this
        };
        
    c.prototype.openBoard=function(){
        return n("Header","Boards Menu","Opened Board")
        };
        
    return c
    }(E);
Va=function(d){
    function c(){
        this.viewArchive=i(this.viewArchive,this);
        this.addBoard=i(this.addBoard,this);
        this.getOrganization=i(this.getOrganization,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.events={
        "click .js-add-board":"addBoard",
        "click .js-view-archive":"viewArchive"
    };
    
    c.prototype.initialize=function(){
        this.model.boardList.bind("change:closed",this.render).onAddRemove(this.render)
        };
    c.prototype.getOrganization=function(){
        return this.options.organization
        };
        
    c.prototype.addBoard=function(b){
        var c,f,d;
        m.stop(b);
        c=this.model.getView(nc,"new",{
            newBoard:!0
            });
        c.idOrganization=null!=(f=null!=(d=this.getOrganization())?d.id:void 0)?f:"";
        0<$(b.target).closest(".pop-over").length?v.pushView({
            view:c
        }):v.toggle({
            elem:$(b.target).closest(".js-add-board")[0],
            top:35,
            view:c
        });
        return!1
        };
        
    c.prototype.viewArchive=function(b){
        var c=this;
        m.preventDefault(b);
        F.show({
            view:this.model.getView(ld)
            });
        rpc.invoke("getBoardList",
            [z.myUsername(),{
                memberships:!0
                }],function(b){
                var d,h,j,i;
                i=b.boards;
                for(h=0,j=i.length;h<j;h++)d=i[h],(b=c.model.boardList.get(d.id))?b.set(d,{
                    silent:!0
                    }):c.model.boardList.add([d],{
                    silent:!0
                    });
                return c.model.boardList.trigger("refresh")
                });
        return!1
        };
        
    return c
    }(E);
nc=function(d){
    function c(){
        this.submit=i(this.submit,this);
        this.helperAddOrg=i(this.helperAddOrg,this);
        this.helperVis=i(this.helperVis,this);
        this.changeOrg=i(this.changeOrg,this);
        this.setPermissionLevel=i(this.setPermissionLevel,this);
        this.render=
        i(this.render,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.getViewTitle=function(){
        return this.options.copyBoard?"Copy Board":"New Board"
        };
        
    c.prototype.events={
        "change select[name='org-id']":"changeOrg",
        "click .js-helper-vis":"helperVis",
        "click .js-helper-add-org":"helperAddOrg",
        "submit form":"submit",
        "click .js-submit":"submit"
    };
    
    c.prototype.render=function(){
        var b,c,f,d;
        b=_.map(z.me().organizationList.models,function(b){
            return b.toJSON()
            });
        this.options.copyBoard&&
        (this.idOrganization=null!=(c=this.model.organization)?c.id:void 0);
        for(f=0,d=b.length;f<d;f++)c=b[f],c.selectOrg=c.id===this.idOrganization?!0:!1;
        c=!!this.idOrganization;
        b={
            orgs:b,
            hasOrg:c,
            canAddToOrgs:0!==b.length,
            isCopyBoard:this.options.copyBoard,
            isNewBoard:this.options.newBoard
            };
            
        this.options.copyBoard?b["permissionLevel_"+this.model.get("prefs").permissionLevel]=!0:c?b.permissionLevel_org=!0:b.permissionLevel_private=!0;
        $(this.el).html(t.fill("board_new",b));
        return this
        };
        
    c.prototype.setPermissionLevel=
    function(b){
        $(this.el).find("select[name='permissionLevel'] option[value='"+b+"']").attr("selected","selected")
        };
        
    c.prototype.getPermissionLevel=function(){
        return $(this.el).find('select[name="permissionLevel"]').val()
        };
        
    c.prototype.changeOrg=function(b){
        var c;
        c=this.getPermissionLevel();
        b=""!==$(b.target).find("option:selected").val();
        "private"===c&&b?this.setPermissionLevel("org"):"org"===c&&!b&&this.setPermissionLevel("private");
        $(this.el).find('option[value="org"]').removeAttr("disabled");
        b||$(this.el).find('option[value="org"]').attr("disabled",
            "disabled")
        };
        
    c.prototype.helperVis=function(b){
        m.stop(b);
        v.pushView({
            view:this.model.getView(Fd)
            })
        };
        
    c.prototype.helperAddOrg=function(b){
        m.stop(b);
        v.pushView({
            view:this.model.getView(Ed)
            })
        };
        
    c.prototype.submit=function(b){
        var c,f=this;
        m.stop(b);
        b={
            name:$(this.el).find('input[name="name"]').val().trim(),
            idOrganization:null!=(c=$(this.el).find('select[name="org-id"]').val())?c:"",
            prefs_permissionLevel:$(this.el).find('select[name="permissionLevel"]').val()
            };
            
        if(""===b.name)$(this.el).find('input[name="name"]').focus().select();
        else return this.options.copyBoard&&(b.idBoardSource=this.model.id,b.keepFromSource=$(this.el).find("input:checkbox[checked]").map(function(){
            return this.name
            }).get().join()),this.options.newBoard?n("Board","Create","New"):this.options.copyBoard&&n("Board","Create","Copy"),ua({
            url:"/1/boards",
            type:"post",
            data:b,
            dataType:"json",
            success:function(b){
                f.options.copyBoard&&Z.hide("copying");
                Controller.displayBoard({
                    board:b,
                    forceReload:!0
                    })
                }
            }),this.options.copyBoard&&Z.show("Copying...","info","copying"),
        v.hide()
        };
        
return c
}(N);
Fd=function(d){
    function c(){
        this.render=i(this.render,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.getViewTitle=function(){
        return"Visibility"
        };
        
    c.prototype.render=function(){
        $(this.el).html(t.fill("popover_helper_new_board_vis"));
        return this
        };
        
    return c
    }(N);
Ed=function(d){
    function c(){
        this.render=i(this.render,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.getViewTitle=function(){
        return"Add an Organization"
        };
        
    c.prototype.render=
    function(){
        $(this.el).html(t.fill("popover_helper_new_board_add_org"));
        return this
        };
        
    return c
    }(N);
Yb=function(d){
    function c(){
        this.keyEvent=i(this.keyEvent,this);
        this.deselectBoards=i(this.deselectBoards,this);
        this.hoverItem=i(this.hoverItem,this);
        this.renderBoards=i(this.renderBoards,this);
        this.getActivityCounts=i(this.getActivityCounts,this);
        this.render=i(this.render,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.getViewTitle=function(){
        return"Boards"
        };
        
    c.prototype.initialize=
    function(){
        this.model.boardPinnedList.onAddRemove(this.render)
        };
        
    c.prototype.events={
        "click .js-add-board":"addBoard",
        "click .js-view-archive":"viewArchive",
        "hover .js-add-board":"deselectBoards",
        "hover .js-view-archive":"deselectBoards",
        "hover .js-see-all-boards":"deselectBoards",
        "hover .js-fill-boards li":"hoverItem",
        "keyup .js-search-boards":"keyEvent"
    };
    
    c.prototype.render=function(){
        var b,c,f;
        b={};
        
        b.allBoardsUrl=Controller.getMemberBoardsUrl();
        $(this.el).html(t.fill("header_boards_menu",b));
        this.searchInput=
        $(this.el).find(".js-search-boards");
        this.fillEl=$(this.el).find(".js-fill-boards");
        this.oldTerm="";
        b=z.me().boardList.models;
        b=_.map(b,function(b){
            return b.id
            });
        f=null!=(c=z.me().boardPinnedList)?c.models:void 0;
        c=_.map(f,function(b){
            return b.id
            });
        c=_.uniq(b.concat(c));
        this.allBoards=_.sortBy(Models.Board.getList(c),function(b){
            return b.get("name").toLowerCase()
            });
        this.renderBoards();
        return this
        };
        
    c.prototype.getActivityCounts=function(b){
        return Models.loadBoardsMenuData(b)
        };
        
    c.prototype.renderBoards=
    function(b){
        var c,f,d,h,j;
        d=this.model;
        b?(f=function(){
            var f,d,g;
            g=[];
            for(f=0,d=b.length;f<d;f++)c=b[f],c.get("closed")||g.push(c);
            return g
            }(),f=f.slice(0,7)):f=function(){
            var b,f,h,j;
            h=d.boardPinnedList.models;
            j=[];
            for(b=0,f=h.length;b<f;b++)c=h[b],c.get("closed")||j.push(c);
            return j
            }();
        this.fillEl.empty();
        for(h=0,j=f.length;h<j;h++)c=f[h],this.fillEl.append(c.getView(Bd).render().el);
        0===f.length&&(f=0===this.model.boardList.length?"No Available Boards":"No Boards",b&&(f="No Matching Boards"),this.fillEl.append('<p class="empty">'+
            f+"</p>"));
        if(b)return m.selectMenuItem(this.fillEl,"li",this.fillEl.find("li:first"))
            };
            
    c.prototype.hoverItem=function(b){
        b=$(b.target).closest("li");
        m.selectMenuItem(this.fillEl,"li",b)
        };
        
    c.prototype.deselectBoards=function(){
        this.fillEl.find("li").removeClass("selected")
        };
        
    c.prototype.keyEvent=function(b){
        var c,f,d,h;
        if(!((f=b.keyCode)===pa||f===ka||f===na||f===ia||f===ja||(b.shiftKey||b.altKey||b.ctrlKey)&&((d=b.keyCode)===Y||d===X)))if((h=b.keyCode)===Y||h===X)m.navMenuList($(".js-fill-boards"),
            "li",b.keyCode);
        else if(b.keyCode===ba)$("list-card.active-card").removeClass("active-card"),b=$(".js-fill-boards").find("li.selected:first").find("a"),0<b.length&&(b.click(),v.hide());
            else if(b=this.searchInput.val().toLowerCase().trim(),this.oldTerm!==b)if(""===b)this.oldTerm=b,this.renderBoards();else return this.oldTerm=b,c=RegExp("^("+b.split(/\s+/).join("|")+")"),b=[],b=_.filter(this.allBoards,function(b){
            b=b.get("name").toLowerCase().split(/\s+/);
            return _.detect(b,function(b){
                return c.test(b)
                })
            }),
        this.deselectBoards(),this.renderBoards(b)
            };
            
    return c
    }(Va);
Gd=function(d){
    function c(){
        this.render=i(this.render,this);
        this.getOrganization=i(this.getOrganization,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.tagName="ul";
    c.prototype.initialize=function(b){
        this.idMember=b.idMember;
        c.__super__.initialize.apply(this,arguments)
        };
        
    c.prototype.getOrganization=function(){
        return this.model
        };
        
    c.prototype.render=function(){
        var b,c,f,d,h,j;
        d=this.model;
        c=d.toJSON();
        c.isMe=z.isMe(d);
        f=_.detect(this.model.get("memberships"),function(b){
            return z.isMe(b.idMember)
            });
        c.isOrgMember=!!f;
        c.displayAddBoard=!0;
        $(this.el).html(t.fill("org_boards_list",c));
        f=function(){
            var c,e,f,h;
            f=d.boardList.models;
            h=[];
            for(c=0,e=f.length;c<e;c++)b=f[c],b.get("closed")||h.push(b);
            return h
            }();
        for(h=0,j=f.length;h<j;h++)b=f[h],c=b.getView(nb,"personal"),$(this.el).find(".js-list-boards").append(c.render(z.isMe(d)).el);
        return this
        };
        
    return c
    }(Va);
Hd=function(d){
    function c(){
        this.render=i(this.render,this);
        this.getOrganization=i(this.getOrganization,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.tagName="ul";
    c.prototype.initialize=function(b){
        this.idMember=b.idMember;
        c.__super__.initialize.apply(this,arguments)
        };
        
    c.prototype.getOrganization=function(){
        return this.model
        };
        
    c.prototype.render=function(){
        var b,c,f,d,h,j;
        d=this.model;
        c=d.toJSON();
        c.isMe=z.isMe(d);
        f=_.detect(this.model.get("memberships"),function(b){
            return z.isMe(b.idMember)
            });
        c.isOrgMember=!!f;
        $(this.el).html(t.fill("org_boards_list",
            c));
        f=function(){
            var c,e,f,h;
            f=d.boardList.models;
            h=[];
            for(c=0,e=f.length;c<e;c++)b=f[c],b.get("closed")&&h.push(b);
            return h
            }();
        for(h=0,j=f.length;h<j;h++)b=f[h],c=b.getView(gb,"personal"),$(this.el).find(".js-list-boards").append(c.render(z.isMe(d)).el);
        return this
        };
        
    return c
    }(Va);
nb=function(d){
    function c(){
        this.joinBoard=i(this.joinBoard,this);
        this.showMenu=i(this.showMenu,this);
        this.openBoard=i(this.openBoard,this);
        this.render=i(this.render,this);
        return c.__super__.constructor.apply(this,arguments)
        }
    u(c,d);
    c.prototype.tagName="li";
    c.prototype.initialize=function(){
        this.model.bind("change:name",this.render);
        return z.me().bind("change:idBoardsPinned",this.render)
        };
        
    c.prototype.events={
        "click .js-boards-list-menu":"showMenu",
        "click .js-join-board":"joinBoard",
        "click .js-open-board":"openBoard"
    };
    
    c.prototype.render=function(){
        var b;
        b=this.model.toJSON({
            prefs:!0,
            url:!0,
            pinned:!0
            });
        100<b.actionCount&&(b.plus=!0,b.actionCount=100);
        b.canJoin=this.model.canJoin();
        $(this.el).html(t.fill("member_board_stats",
            b));
        return this
        };
        
    c.prototype.openBoard=function(){
        return n("Member","Boards Page","Opened Board - "+this.options.boardType)
        };
        
    c.prototype.showMenu=function(b){
        var c=this;
        m.stop(b);
        n("Member","Boards Page","Opened Board Menu - "+this.options.boardType);
        Models.loadBoardMenuData(this.model.id,function(){
            return v.toggle({
                elem:$(b.target).closest(".js-boards-list-menu")[0],
                top:30,
                view:Models.Board.get(c.model.id).getView(Wa)
                })
            })
        };
        
    c.prototype.joinBoard=function(b){
        m.stop(b);
        z.me().api.addToBoard({
            idBoard:this.model.id
            });
        this.model.memberList.add(z.me());
        z.me().boardList.add(this.model);
        n("Member","Boards Page","Joined Board - "+this.options.boardType);
        $(b.currentTarget).hide()
        };
        
    return c
    }(E);
hc=function(d){
    function c(){
        this.loadAllOrgBoards=i(this.loadAllOrgBoards,this);
        this.showMore=i(this.showMore,this);
        this.render=i(this.render,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.initialize=function(){
        this.model.boardList.onAddRemove(this.render).bind("change:closed",this.render).bind("change:idOrganization",
            this.render);
        this.showAll=!1;
        return this.loadAllOrgBoards()
        };
        
    c.prototype.render=function(){
        var b,c,f,d,h,j,i,o=this;
        f=this.model;
        d=this.options.organization;
        this.isMe=z.isMe(this.options.model);
        this.boardTypeStr="";
        c=function(b){
            if(b.get("closed"))return!1;
            if(d)return o.boardTypeStr="Your Org Board",o.isMe||(o.boardTypeStr="Other Person's Org Board"),b.get("idOrganization")===d.id;
            o.boardTypeStr="Your Personal Board";
            o.isMe||(o.boardTypeStr="Other Person's Personal Board");
            return!b.organization
            };
        h=f.boardList.filter(c);
        c=_.difference(Models.Board.all().filter(c),h);
        d?(b=d.toJSON({
            prefs:!0,
            url:!0
            }),b.hasMore=!this.showAll&&(null!=c?c.length:void 0),b.showAll=this.showAll&&(null!=c?c.length:void 0)):b={
            displayName:"Boards"
        };
        
        b.isMe=this.isMe;
        b.empty=0===h.length;
        $(this.el).html(t.fill("member_boards_list",b,{
            editable:z.isMe(f)
            }));
        $(this.el).find(".js-list-boards").empty();
        for(j=0,i=h.length;j<i;j++)b=h[j],b=b.getView(nb,"org",{
            boardType:this.boardTypeStr
            }),$(this.el).find(".js-list-boards").append(b.render(z.isMe(f)).el);
        $(this.el).find(".js-show-all-org-boards:first").click(function(){
            return o.showMore()
            });
        if(this.showAll)for(h=0,j=c.length;h<j;h++)b=c[h],this.boardTypeStr="Your Other Org Board",this.isMe||(this.boardTypeStr="Other Person's Other Org Board"),b=b.getView(nb,"org",{
            boardType:this.boardTypeStr
            }),$(this.el).find(".js-list-more-boards").append(b.render(z.isMe(f)).el);
        $(this.el).find(".js-view-org-profile").click(function(){
            return n("Member","Boards Page","View Org Profile")
            });
        return this
        };
        
    c.prototype.showMore=
    function(){
        this.showAll=!0;
        n("Member","Boards Page","Show All Org Boards");
        return this.render()
        };
        
    c.prototype.loadAllOrgBoards=function(){
        var b=this;
        if(null!=this.options.organization)return Models.loadOrganizationData(this.options.organization.get("name"),!0,function(){
            return $(b.el).find(".js-show-all-boards-block").show()
            },function(){})
            };
            
    return c
    }(Va);
ud=function(d){
    function c(){
        this.render=i(this.render,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.tagName="ul";
    c.prototype.initialize=function(b){
        this.idMember=b.idMember;
        c.__super__.initialize.apply(this,arguments);
        this.model.boardInvitedList.bind("change",this.render).bind("refresh",this.render).bind("add",this.render).bind("remove",this.render)
        };
        
    c.prototype.render=function(){
        var b=this;
        $(this.el).html(t.fill("member_invitation_list",{
            model:"Board"
        }));
        $(this.el).find(".js-list-invitations").empty();
        this.model.boardInvitedList.forEach(function(c){
            if(!c.get("closed"))return c=new Ad({
                model:c
            }),$(b.el).find(".js-list-invitations").append(c.render().el)
                });
        return this
        };
        
    return c
    }(Va);
Ad=function(d){
    function c(){
        this.rejectInvitation=i(this.rejectInvitation,this);
        this.acceptInvitation=i(this.acceptInvitation,this);
        this.render=i(this.render,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.tagName="li";
    c.prototype.events={
        "click .js-accept-invitation":"acceptInvitation",
        "click .js-reject-invitation":"rejectInvitation"
    };
    
    c.prototype.render=function(){
        var b;
        b=this.model.toJSON();
        b.url=Controller.getBoardUrl(b);
        $(this.el).html(t.fill("member_invitation",
            b));
        return this
        };
        
    c.prototype.acceptInvitation=function(){
        $(this.el).find(".js-accept-invitation").attr("disabled","disabled");
        this.model.acceptInvite();
        return n("Member","Boards Page","Accept Board Invite")
        };
        
    c.prototype.rejectInvitation=function(){
        this.model.rejectInvite();
        return n("Member","Boards Page","Reject Board Invite")
        };
        
    return c
    }(E)
}
if(C("boardMenu")){
    var Ab,Kd,Ld,ya,Wa,Md,Nd,Od,Pd,Qd,rc,Rd,i=function(d,c){
        return function(){
            return d.apply(c,arguments)
            }
        },D={}.hasOwnProperty,u=function(d,c){
    function b(){
        this.constructor=
        d
        }
        for(var e in c)D.call(c,e)&&(d[e]=c[e]);b.prototype=c.prototype;
    d.prototype=new b;
    d.__super__=c.prototype;
    return d
    };
    
Wa=function(d){
    function c(){
        this.closeConfirm=i(this.closeConfirm,this);
        this.shareBoard=i(this.shareBoard,this);
        this.unpinBoard=i(this.unpinBoard,this);
        this.pinBoard=i(this.pinBoard,this);
        this.copyBoard=i(this.copyBoard,this);
        this.filterCards=i(this.filterCards,this);
        this.addList=i(this.addList,this);
        this.render=i(this.render,this);
        return c.__super__.constructor.apply(this,arguments)
        }
    u(c,d);
    c.prototype.getViewTitle=function(){
        return""+this.model.get("name")
        };
        
    c.prototype.events={
        "click .js-settings":"openSettings",
        "click .js-members":"openMembers",
        "click .js-archived-items":"openArchivedItems",
        "click .js-labels":"openLabels",
        "click .js-activity":"openActivity",
        "click .js-add-list":"addList",
        "click .js-board-menu-filter-cards":"filterCards",
        "click .js-copy-board":"copyBoard",
        "click .js-pin-board":"pinBoard",
        "click .js-unpin-board":"unpinBoard",
        "click .js-share":"shareBoard",
        "click .js-close-board":"closeConfirm"
    };
    c.prototype.initialize=function(){
        this.model.bind("change",this.render)
        };
        
    c.prototype.render=function(){
        var b;
        b=this.model.toJSON({
            url:!0
            });
        b.pinned=this.model.isPinned();
        b.canPin=z.isLoggedIn();
        Controller.onAnyBoardView()&&(b.showBoardDetailFunctions=!0);
        $(this.el).html(t.fillMenu("board_menu",b,{
            editable:this.model.editable(),
            owned:this.model.owned()
            }));
        return this
        };
        
    c.prototype.openSettings=function(b){
        m.stop(b);
        n("Board Menu","Open Settings");
        v.pushView({
            view:this.model.getView(Pd)
            })
        };
        
    c.prototype.openMembers=
    function(){
        var b;
        n("Board Menu","Open Members");
        b=this.model.getView(ya);
        b.getOrgData();
        v.pushView({
            view:b
        })
        };
        
    c.prototype.openArchivedItems=function(){
        var b;
        n("Board Menu","Open Archived Items");
        b=this.model.getView(Kd);
        b.getData();
        F.show({
            view:b,
            displayType:"archive"
        })
        };
        
    c.prototype.openLabels=function(){
        n("Board Menu","Edit Labels");
        v.pushView({
            view:this.model.getView(rc)
            })
        };
        
    c.prototype.openActivity=function(){
        n("Board Menu","Open Activity");
        F.show({
            view:this.model.getView(Ab),
            displayType:"slim"
        })
        };
    c.prototype.addList=function(b){
        m.stop(b);
        n("Board Menu","Open Add List");
        v.pushView({
            view:this.model.getView(Ia,"default")
            })
        };
        
    c.prototype.filterCards=function(b){
        m.stop(b);
        n("Board Menu","Open Search and Filter Cards");
        v.pushView({
            view:this.model.getView(lc)
            })
        };
        
    c.prototype.copyBoard=function(b){
        m.stop(b);
        n("Board Menu","Open Copy Board");
        v.pushView({
            view:this.model.getView(nc,"copy",{
                copyBoard:!0
                })
            })
        };
        
    c.prototype.pinBoard=function(){
        n("Board Menu","Pin/Unpin","Pin");
        this.model.pin(!0);
        this.render()
        };
    c.prototype.unpinBoard=function(){
        n("Board Menu","Pin/Unpin","Unpin");
        this.model.pin(!1);
        this.render()
        };
        
    c.prototype.shareBoard=function(b){
        m.stop(b);
        n("Board Menu","Share, Print, Export");
        v.pushView({
            view:this.model.getView(oc)
            })
        };
        
    c.prototype.closeConfirm=function(b){
        m.stop(b);
        n("Board Menu","Open Confirm Close");
        v.pushView({
            view:this.model.getView(Qd)
            })
        };
        
    return c
    }(E);
Pd=function(d){
    function c(){
        this.render=i(this.render,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.getViewTitle=
    function(){
        return"Settings"
        };
        
    c.prototype.events={
        "click .js-rename":"renameBoard",
        "click .js-org":"changeOrg",
        "click .js-permissions":"changePermissions",
        "click .js-desc":"editDesc",
        "click .js-layout":"changeLayout"
    };
    
    c.prototype.render=function(){
        var b,c;
        b=this.model.toJSON({
            prefs:!0,
            url:!0
            });
        b.pinned=this.model.isPinned();
        b.canPin=z.isLoggedIn();
        Controller.onAnyBoardView()&&(b.showBoardDetailFunctions=!0);
        if(null!=(c=this.model.organization)&&c.owned())b.orgOwner=!0,b.orgName=this.model.organization.get("displayName");
        $(this.el).html(t.fillMenu("board_menu_settings",b,{
            editable:this.model.editable(),
            owned:this.model.owned()
            }));
        return this
        };
        
    c.prototype.renameBoard=function(b){
        m.stop(b);
        n("Board Menu","Open Rename Board");
        v.pushView({
            view:this.model.getView(Rd)
            })
        };
        
    c.prototype.changeOrg=function(b){
        m.stop(b);
        n("Board Menu","Change Org");
        v.pushView({
            view:this.model.getView(Od)
            })
        };
        
    c.prototype.changePermissions=function(b){
        m.stop(b);
        n("Board Menu","Change Permissions");
        v.pushView({
            view:this.model.getView(Nd)
            })
        };
        
    c.prototype.editDesc=
    function(b){
        m.stop(b);
        n("Board Menu","Edit Description");
        F.show({
            view:this.model.getView(mc),
            displayType:"slim"
        })
        };
        
    c.prototype.changeLayout=function(b){
        m.stop(b);
        n("Board Menu","Change Layout Options");
        v.pushView({
            view:this.model.getView(Ld)
            })
        };
        
    return c
    }(E);
Rd=function(d){
    function c(){
        this.rename=i(this.rename,this);
        this.render=i(this.render,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.getViewTitle=function(){
        return"Rename Board"
        };
        
    c.prototype.events={
        "click`.js-rename-board":"rename",
        "submit form":"rename"
    };
    
    c.prototype.render=function(){
        var b;
        b={};
        
        b.boardName=this.model.get("name");
        $(this.el).html(t.fill("popover_rename_board",b));
        return this
        };
        
    c.prototype.rename=function(b){
        m.stop(b);
        b=$(this.el).find(".js-board-name").val();
        ""!==b&&(n("Board","Successfully Rename Board"),this.model.set({
            name:b
        }),this.model.save(),v.hide())
        };
        
    return c
    }(E);
Od=function(d){
    function c(){
        this.submit=i(this.submit,this);
        this.cancel=i(this.cancel,this);
        this.render=i(this.render,this);
        return c.__super__.constructor.apply(this,
            arguments)
        }
        u(c,d);
    c.prototype.getViewTitle=function(){
        return"Change Organization"
        };
        
    c.prototype.events={
        "click .js-cancel":"cancel",
        "click .js-submit":"submit"
    };
    
    c.prototype.render=function(){
        var b,c,f,d,h;
        b=this.model.toJSON({
            org:!0
            });
        f=this.model.owned()?z.me().organizationList.models:[];
        var j;
        j=[];
        for(d=0,h=f.length;d<h;d++)c=f[d],j.push(c.toJSON());
        b.orgs=j;
        b.hasOrgs=0!==b.orgs.length;
        if(b.idOrganization){
            h=b.orgs;
            for(f=0,d=h.length;f<d;f++)c=h[f],c.id===b.idOrganization&&(c.select=!0)
                }
                $(this.el).html(t.fill("popover_change_board_org",
            b));
        return this
        };
        
    c.prototype.cancel=function(){
        return v.hide()
        };
        
    c.prototype.submit=function(b){
        var c;
        m.stop(b);
        n("Board Menu","Change Org");
        c=$(this.el).find(".js-org").val();
        b=this.model.get("idOrganization");
        c!==b&&(b&&Models.Organization.get(b).boardList.remove(this.model),this.model.updateNew({
            idOrganization:c
        }),c&&Models.Organization.get(c).boardList.add(this.model));
        return v.hide()
        };
        
    return c
    }(E);
Nd=function(d){
    function c(){
        this.render=i(this.render,this);
        return c.__super__.constructor.apply(this,
            arguments)
        }
        u(c,d);
    c.prototype.getViewTitle=function(){
        return"Change Permissions"
        };
        
    c.prototype.initialize=function(){
        return this.model.bind("change:prefs",this.render)
        };
        
    c.prototype.events={
        "change select":"changePerm"
    };
    
    c.prototype.render=function(){
        var b,c;
        b=this.model.toJSON({
            prefs:!0
            });
        b.hasOrg=null!=(null!=(c=this.model.organization)?c.id:void 0);
        c={
            editable:this.model.editable(),
            owned:this.model.owned()
            };
            
        $(this.el).html(t.fill("board_menu_perms",b,c));
        this.renderCurrentValue();
        return this
        };
        
    c.prototype.renderCurrentValue=
    function(){
        var b;
        b=$(this.el).find(".setting");
        b.each(function(c){
            var f;
            f=b[c];
            c=$(f).find("option:selected").text().trim();
            return $(f).find(".value").text(c)
            })
        };
        
    c.prototype.changePerm=function(b){
        var c,f,d;
        c=$(b.target);
        c.closest(".setting");
        !c.hasClass("disabled")&&!c.closest(".js-disabled").length&&(f=c.attr("name"),d=c.find("option:selected").val(),d=function(){
            switch(d){
                case "true":
                    return!0;
                case "false":
                    return!1;
                default:
                    return d
                    }
                }(),this.model.setPref(f,d),this.model.save(),m.stop(b))
    };
    
return c
}(N);
Ld=function(d){
    function c(){
        this.render=i(this.render,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.getViewTitle=function(){
        return"Layout Options"
        };
        
    c.prototype.initialize=function(){
        return this.model.bind("change:myPrefs",this.render)
        };
        
    c.prototype.events={
        "change select":"changePref"
    };
    
    c.prototype.render=function(){
        var b,c;
        b=this.model.toJSON({
            prefs:!0
            });
        c={
            editable:this.model.editable(),
            owned:this.model.owned()
            };
            
        $(this.el).html(t.fill("board_menu_layout",b,c));
        this.renderCurrentValue();
        return this
        };
        
    c.prototype.renderCurrentValue=function(){
        var b;
        b=$(this.el).find(".setting");
        b.each(function(c){
            var f;
            f=b[c];
            c=$(f).find("option:selected").text().trim();
            return $(f).find(".value").text(c)
            })
        };
        
    c.prototype.changePref=function(b){
        var c,f,d;
        c=$(b.target);
        c.closest(".setting");
        !c.hasClass("disabled")&&!c.closest(".js-disabled").length&&(f=c.attr("name"),d=c.find("option:selected").val(),d=function(){
            switch(d){
                case "true":
                    return!0;
                case "false":
                    return!1;
                default:
                    return d
                    }
                }(),this.model.setPref(f,
            d),this.model.save(),m.stop(b))
    };
    
return c
}(N);
ya=function(d){
    function c(){
        this.viewMoreOrgMembers=i(this.viewMoreOrgMembers,this);
        this.addAllOrgMembers=i(this.addAllOrgMembers,this);
        this.addOrgMember=i(this.addOrgMember,this);
        this.orgMembersAvailable=i(this.orgMembersAvailable,this);
        this.canRemoveInvitation=i(this.canRemoveInvitation,this);
        this.removeInvitation=i(this.removeInvitation,this);
        this.clearSearchResults=i(this.clearSearchResults,this);
        this.sendMemberInvitation=i(this.sendMemberInvitation,
            this);
        this.sendEmailInvitation=i(this.sendEmailInvitation,this);
        this.hoverMember=i(this.hoverMember,this);
        this.keydownEvent=i(this.keydownEvent,this);
        this.search=i(this.search,this);
        this.searchPaste=i(this.searchPaste,this);
        this.showMemberMenu=i(this.showMemberMenu,this);
        this.renderSearchResults=i(this.renderSearchResults,this);
        this.renderOrgMembers=i(this.renderOrgMembers,this);
        this.renderBoardMembers=i(this.renderBoardMembers,this);
        this.renderInvitations=i(this.renderInvitations,this);
        this.getOrgData=
        i(this.getOrgData,this);
        this.render=i(this.render,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.getViewTitle=function(){
        return"Members"
        };
        
    c.prototype.initialize=function(){
        var b;
        this.invitationList=this.model.boardInvitationList;
        this.invitationList.onAddRemove(this.renderInvitations).bind("change",this.renderInvitations);
        if(null!=(b=this.model.organization))b.memberList.onAddRemove(this.renderOrgMembers)
            };
            
    c.prototype.events={
        "click .js-board-members .js-select-member":"showMemberMenu",
        "click .js-search-results .js-select-member":"sendMemberInvitation",
        "click .js-search-results .email-invite":"sendEmailInvitation",
        "paste .js-search-input":"searchPaste",
        "click .js-org-members .js-select-member":"addOrgMember",
        "click .js-org-members .js-add-all-org-members":"addAllOrgMembers",
        "click .js-org-members .js-more-org-members":"viewMoreOrgMembers",
        "click .js-remove-invitation":"removeInvitation",
        "hover .js-select-member":"hoverMember"
    };
    
    c.prototype.render=function(){
        var b,c,f=this;
        c={
            placeholder:"Search or add email address"
        };
        b=this.model.canInviteMembers();
        null!=this.model.organization&&(c.orgName=this.model.organization.get("displayName"));
        c.canInvite=b;
        $(this.el).html(t.fill("manage_members",c,{
            editable:this.model.editable()
            }));
        b?_.delay(function(){
            f.renderOrgMembers();
            f.renderInvitations();
            f.input=$(f.el).find(".js-search-input");
            return f.input.click(function(b){
                return m.stop(b)
                }).keyup(_.debounce(f.search,500)).keydown(f.keydownEvent).focus()
            },10):_.delay(function(){
            return f.renderBoardMembers()
            },10);
        this.loadingEl=
        $(this.el).find(".js-loading");
        v.calcTop();
        return this
        };
        
    c.prototype.getOrgData=function(){
        var b=this;
        if(null!=this.model.organization&&this.model.editable())return Models.loadOrganizationData(this.model.organization.id,!0,function(){
            b.model.organization.trigger("change:memberships");
            return b.renderOrgMembers()
            },function(){})
            };
            
    c.prototype.renderInvitations=function(){
        var b,c,f,d=this;
        c=$(this.el).find(".js-pending-invites");
        b=c.find(".js-list").empty();
        f=this.invitationList;
        c.toggle(0<f.length);
        f.each(function(c){
            var e,
            f,i;
            i=Models.Member.get(c.get("idMemberInviter"));
            e={
                MemberInviter:null!=i?i.toJSON():void 0,
                idMemberInvited:c.get("idMemberInvited"),
                dateExpires:c.get("dateExpires"),
                email:c.get("email"),
                canRemove:d.canRemoveInvitation(c)
                };
                
            e.idMemberInvited&&(f=Models.Member.get(e.idMemberInvited),null!=f&&(e.MemberInvited=f.toJSON()));
            e=$(t.fill("invitation",e,{},{
                member:t.member,
                member_inline:t.member_inline
                }));
            e.find(".inviter .inline-member-container").data("member",i);
            null!=f&&e.find(".invitee .inline-member-container").data("member",
                f);
            e.data("id",c.get("id"));
            b.append(e)
            });
        c.toggle(0<f.length);
        U.update(this.el);
        v.calcTop();
        return this
        };
        
    c.prototype.renderBoardMembers=function(){
        var b,c;
        c=$(this.el).find(".js-board-members").hide();
        b=c.find(".js-list").empty();
        7<this.model.memberList.models.length&&b.addClass("collapsed");
        _.each(this.model.memberList.models,function(c){
            c=c.toJSON();
            return b.append(t.fill("select_member",c,{},{
                member:t.member
                }))
            });
        c.show();
        v.calcTop()
        };
        
    c.prototype.renderOrgMembers=function(){
        var b,c,f,d,h;
        f=$(this.el).find(".js-org-members").hide();
        c=f.find(".js-list").empty();
        b=f.find(".js-num-org-mem").empty();
        d=f.find(".js-more-org-members").addClass("hide");
        null!=this.model.organization&&(h=this.orgMembersAvailable(),0<h.length&&(7<h.length&&d.removeClass("hide"),d=h.slice(0,7),_.each(d,function(b){
            b=b.toJSON();
            return c.append(t.fill("select_member",b,{},{
                member:t.member
                }))
            }),b.html(h.length),f.show()),v.calcTop())
        };
        
    c.prototype.renderSearchResults=function(b,c){
        var f,d,h,j,i,o,q,n,u,s;
        o=c.members;
        j=c.invitedEmails;
        u=c.uninvitedEmails;
        f=
        $(this.el);
        h=f.find(".js-search-results");
        d=h.find(".js-list").empty();
        n=_.all([j,u,o],_.isEmpty);
        i=3<=b.trim().length;
        f.find(".js-no-results").toggle(n&&i);
        h.toggle(!n);
        $(this.el).find(".js-org-members").hide();
        i||this.renderOrgMembers();
        f=_.map(this.invitationList.models,function(b){
            return b.get("idMemberInvited")
            });
        h={
            invited:"invited",
            joined:"joined",
            uninvitedExact:"will-invite",
            uninvitedFuzzy:""
        };
        
        q={
            invited:2,
            joined:3,
            uninvitedExact:1,
            uninvitedFuzzy:1
        };
        
        for(n=0,s=u.length;n<s;n++)i=u[n],$(t.fill("member_search_result_email",

        {
            email:i,
            isInvitable:!0,
            className:"will-invite"
        })).data({
            email:i
        }).appendTo(d);
        for(u=0,n=j.length;u<n;u++)i=j[u],$(t.fill("member_search_result_email",{
            email:i,
            isInvitable:!1,
            className:"invited",
            extraText:"already invited"
        })).appendTo(d);
        s=_.sortBy(o,function(b){
            return 1E4*q[b.type]-b.similarity
            });
        for(i=0,n=s.length;i<n;i++)o=s[i],u=o.type,delete o.type,delete o.similarity,null==Models.Member.get(o.id)&&Models.Member.add(new ta(o)),j=_.extend({
            className:h[u],
            isInvitable:"uninvitedFuzzy"===u||"uninvitedExact"===
            u
            },o),null==j.id&&(j.id=o.id),_.include(f,o.id)&&(j.extraText="invited"),"joined"===h[u]&&(j.extraText="already joined"),d.append(t.fill("select_member",j,{},{
            member:t.member
            }));
        this.loadingEl.hide();
        d=$(this.el).find(".js-search-results .js-list li:first");
        m.selectMenuItem($(this.el).find(".js-org-members .js-list"),"li",d);
        v.calcTop()
        };
        
    c.prototype.showMemberMenu=function(b){
        m.stop(b);
        b=$(b.target).closest(".js-select-member").attr("idMember");
        b=Models.Member.get(b);
        v.pushView({
            view:b.getView(ic,
                "board",{
                    board:this.model
                    })
            })
        };
        
    c.prototype.searchPaste=function(){
        this.loadingEl.show();
        return this.input.keyup()
        };
        
    c.prototype.search=function(b){
        var c,f,d=this;
        if(!((f=b.keyCode)===pa||f===na||f===ka||f===Y||f===ja||f===X||f===ia||f===oa))this.loadingEl.show(),c=this.input.val().toLowerCase().trim(),rpc.invoke("searchBoardMembers",[c,this.model.id],function(b){
            return d.renderSearchResults(c,b)
            })
        };
        
    c.prototype.keydownEvent=function(b){
        var c,f;
        if(!((c=b.keyCode)===pa||c===na||c===ka||c===ja||c===ia||
            c===oa))if(b.keyCode===ba)0<$(this.el).find(".js-search-results .js-list .selected .js-select-member").length?(m.stop(b),$(this.el).find(".js-search-results .js-list .selected:first .js-select-member").click()):0<$(this.el).find(".js-search-results .js-list .email-invite").length&&(m.stop(b),$(this.el).find(".email-invite:first").click());
            else if((f=b.keyCode)===Y||f===X)m.stop(b),m.navMenuList($(this.el).find(".js-search-results .js-list"),"li",b.keyCode)
            };
            
    c.prototype.hoverMember=function(b){
        b=$(b.target).closest("li");
        return m.selectMenuItem($(this.el).find(".pop-over-member-list"),"li",b)
        };
        
    c.prototype.sendEmailInvitation=function(b){
        var c,f=this;
        m.stop(b);
        b=$(b.target).closest(".email-invite").find(".email").text();
        c=_.map(this.invitationList.models,function(b){
            return b.get("email")
            });
        _.include(c,b)||(n("Invitations","Send","Email Address"),this.clearSearchResults(),ABTest.event("invite_new_member"),this.invitationList.create({
            email:b,
            idMemberInviter:z.myId()
            },{
            error:function(b){
                return f.invitationList.remove(b)
                }
            }))
    };
c.prototype.sendMemberInvitation=function(b){
    var c,f,d,h,j=this;
    m.stop(b);
    b=$(b.target).closest(".js-select-member").attr("idMember");
    d=Models.Member.get(b);
    c=_.map(this.invitationList.models,function(b){
        return b.get("idMemberInvited")
        });
    f=_.map(this.model.memberList.models,function(b){
        return b.id
        });
    c=c.concat(f);
    _.include(c,b)||(this.clearSearchResults(),ABTest.event("invite_existing_member"),c=_.pluck(null!=(h=this.model.organization)?h.memberList.models:void 0,"id"),_.include(c,b)?(n("Invitations",
        "Add Org Member"),d.api.addToBoard({
        idBoard:this.model.id
        }),this.model.memberList.add(d)):(n("Invitations","Send","Member"),this.invitationList.create({
        idMemberInvited:b,
        idMemberInviter:z.myId()
        },{
        error:function(b){
            return j.invitationList.remove(b)
            }
        })))
};

c.prototype.clearSearchResults=function(){
    this.input.val("").focus().select();
    $(this.el).find(".js-search-results").hide();
    return this.renderOrgMembers()
    };
    
c.prototype.removeInvitation=function(b){
    var c;
    n("Invitations","Delete");
    null!=(c=this.invitationList.get($(b.currentTarget).closest(".invitation").data("id")))&&
    c.destroy({
        success:this.search
        });
    m.setCaretAtEnd(this.input[0])
    };
    
c.prototype.canRemoveInvitation=function(b){
    return b.get("idMemberInviter")===z.myId()||this.model.owned()
    };
    
c.prototype.orgMembersAvailable=function(){
    return _.difference(this.model.organization.memberList.models,this.model.memberList.models)
    };
    
c.prototype.addOrgMember=function(b){
    m.stop(b);
    n("Invitations","Add Org Member");
    b=$(null!=b?b.target:void 0).closest(".js-select-member").attr("idMember");
    b=Models.Member.get(b);
    b.api.addToBoard({
        idBoard:this.model.id
        });
    this.model.memberList.add(b);
    this.renderOrgMembers()
    };
    
c.prototype.addAllOrgMembers=function(b){
    var c,f,d;
    m.stop(b);
    n("Invitations","Add All Org Members");
    c=this.orgMembersAvailable();
    for(f=0,d=c.length;f<d;f++)b=c[f],b.api.addToBoard({
        idBoard:this.model.id
        }),this.model.memberList.add(b);
    return v.hide()
    };
    
c.prototype.viewMoreOrgMembers=function(b){
    m.stop(b);
    n("Board Menu","View More Org Members");
    v.pushView({
        view:this.model.getView(Md)
        })
    };
    
return c
}(N);
Md=function(d){
    function c(){
        this.hoverMember=i(this.hoverMember,
            this);
        this.enableSelfJoin=i(this.enableSelfJoin,this);
        this.filterAndFillMembers=i(this.filterAndFillMembers,this);
        this.keyupEvent=i(this.keyupEvent,this);
        this.render=i(this.render,this);
        this.renderOrgMembers=i(this.renderOrgMembers,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.getViewTitle=function(){
        return"Organization Members"
        };
        
    c.prototype.initialize=function(){
        var b;
        if(null!=(b=this.model.organization))b.memberList.onAddRemove(this.render)
            };
            
    c.prototype.events={
        "click .js-org-members .js-select-member":"addOrgMember",
        "click .js-org-members .js-add-all-org-members":"addAllOrgMembers",
        "click .js-enable-self-join":"enableSelfJoin",
        keyup:"keyupEvent",
        "hover .js-select-member":"hoverMember"
    };
    
    c.prototype.renderOrgMembers=function(b){
        var c,f,d,h;
        d=[];
        if(b)for(h=0,c=b.length;h<c;h++)f=b[h],d.push(Models.Member.get(f));else d=this.model.getView(ya).orgMembersAvailable();
        b=$(this.el).find(".js-org-members .js-list").empty();
        for(f=0,h=d.length;f<h;f++)c=d[f],c=c.toJSON(),b.append(t.fill("select_member",c,{},{
            member:t.member
            }));
        $(this.el).find(".js-org-members .js-num-org-mem").empty().text(d.length)
        };
        
    c.prototype.render=function(){
        var b,c;
        b=this.model.toJSON({
            prefs:!0
            });
        b.placeholder="Search for organization members";
        b.orgName=null!=(c=this.model.organization)?c.get("displayName"):void 0;
        b.canInvite=!0;
        $(this.el).html(t.fill("manage_members",b,{
            editable:this.model.editable()
            }));
        this.renderOrgMembers();
        $(this.el).find(".js-org-members").removeClass("hide");
        $(this.el).find(".js-add-all-org-members").removeClass("hide");
        $(this.el).find(".js-enable-self-join").removeClass("hide");
        return this
        };
        
    c.prototype.keyupEvent=function(b){
        var c,f,d,h;
        c=$(".js-search-input").val().trim();
        if(!((f=b.keyCode)===pa||f===na||f===ka))b.keyCode===ba?(m.stop(b),0<$(this.el).find(".js-org-members .js-list .selected").length&&(b=$(this.el).find(".js-org-members .js-list .selected:first .js-select-member").attr("idMember"),b=Models.Member.get(b),b.api.addToBoard({
            idBoard:this.model.id
            }),this.model.memberList.add(b),$(this.el).find(".js-search-input").focus().select())):(d=b.keyCode)===Y||d===X?(m.stop(b),
            m.navMenuList($(null!=(h=v.view)?h.el:void 0).find(".js-org-members .js-list"),".item",b.keyCode)):0<c.length?(this.filterAndFillMembers(c),$(".js-org-members .js-list").removeClass("collapsed"),$(".js-add-all-org-members").addClass("hide")):(this.renderOrgMembers(),$(".js-org-members .js-list").addClass("collapsed"),$(".js-add-all-org-members").removeClass("hide"))
            };
            
    c.prototype.filterAndFillMembers=function(b){
        var c;
        c=_.pluck(this.model.getView(ya).orgMembersAvailable(),"id");
        b=m.filterMembers(b,
            c);
        b=b.slice(0,7);
        0<b.length?(this.renderOrgMembers(b),b=$(this.el).find(".js-org-members .js-list .item:first"),m.selectMenuItem($(this.el).find(".js-org-members .js-list"),".item",b)):$(this.el).find(".js-org-members .js-list").html("<li><p class='empty'>No matched members</p></li>")
        };
        
    c.prototype.addOrgMember=function(b){
        return this.model.getView(ya).addOrgMember(b)
        };
        
    c.prototype.addAllOrgMembers=function(b){
        return this.model.getView(ya).addAllOrgMembers(b)
        };
        
    c.prototype.enableSelfJoin=function(b){
        $(b.target).hide();
        n("Board Menu","Enable Self Join");
        this.model.setPref("selfJoin","enabled");
        this.model.save();
        return this.render()
        };
        
    c.prototype.hoverMember=function(b){
        b=$(b.target).closest(".item");
        return m.selectMenuItem($(this.el).find(".pop-over-member-list"),".item",b)
        };
        
    return c
    }(N);
Kd=function(d){
    function c(){
        this.switchSections=i(this.switchSections,this);
        this.setSectionLabel=i(this.setSectionLabel,this);
        this.renderSearchResults=i(this.renderSearchResults,this);
        this.loadData=i(this.loadData,this);
        this.render=
        i(this.render,this);
        this.debouncedLoadData=_.debounce(this.loadData,150);
        this.results={};
        
        c.__super__.constructor.apply(this,arguments)
        }
        var b;
    u(c,d);
    c.prototype.initialize=function(){
        var b,c,d,h=this;
        d={};
        
        this.section="cards";
        this.loading=!0;
        b=function(b){
            if(!d[b.id])return d[b.id]=!0,b.cardList.onAddRemove(h.render).bind("change:closed",h.render)
                };
                
        c=function(c){
            return c.forEach(b)
            };
            
        this.model.listList.onAddRemove(c).onAddRemove(this.render).bind("change:closed",this.render);
        return c(this.model.listList)
        };
    c.prototype.events={
        "click .js-switch-section":"switchSections",
        "click .js-more-archive-cards":"getMoreCards",
        "keyup .js-search":"keyupEvent"
    };
    
    b=function(b,c){
        var d,h,j,i;
        d={};
        
        _.each(b.cards,function(b){
            var e,h;
            (e=c.getCard(null!=(h=b.id)?h:b._id))?(e.set(b,{
                silent:!0
                }),d[e.get("idList")]=!0):(e=Models.finishInit(new xa(b)),Models.Card.add(e,{
                silent:!0
                }));
            if((h=c.getList(b.idList))&&!h.cardList.include(e))return h.cardList.add(e,{
                silent:!0
                }),d[b.idList]=!0
            });
        i=[];
        for(h in d)i.push(null!=(j=c.getList(h))?
            j.cardList.trigger("refresh"):void 0);return i
        };
        
    c.prototype.getMoreCards=function(){
        var c,f,d=this;
        c=this.model;
        if("cards"===this.section)return this.loading=!0,f=Date.now(),this.model.listList.forEach(function(b){
            return b.cardList.forEach(function(b){
                if(b.get("closed")&&new Date(b.get("dateLastActivity"))<f)return f=new Date(b.get("dateLastActivity"))
                    })
            }),rpc.invoke("getClosedCards",[c.id,{
            count:10,
            oldest:f
        }],function(f){
            b(f,c);
            d.hasMoreCards=f.hasMore;
            d.loading=!1;
            return d.render()
            })
        };
        
    c.prototype.getData=
    function(){
        var c,f=this;
        c=this.model;
        "cards"===this.section&&(this.loading=!0,rpc.invoke("getClosedCards",[c.id,{
            count:10
        }],function(d){
            b(d,c);
            d.hasMore&&(f.hasMoreCards=!0);
            f.loading=!1;
            f.render()
            }))
        };
        
    c.prototype.render=function(){
        var b,c,d,h,j=this;
        b="lists"===this.section;
        d=!b;
        b?(h=this.model.listList.filter(function(b){
            return b.get("closed")
            }),c=function(b){
            return b.get("name")
            }):(h=[],this.model.listList.forEach(function(b){
            return h=h.concat(b.cardList.filter(function(b){
                return b.get("closed")
                }))
            }),
        c=function(b){
            return(b=0-new Date(b.get("dateLastActivity")))?b:0
            });
        h=_.sortBy(h,c);
        c=this.model.toJSON();
        b={
            loading:this.loading,
            empty:!this.loading&&0===h.length,
            emptyMessage:"No Archived "+(b?"Lists":"Cards"),
            hasMoreCards:!this.loading&&this.hasMoreCards&&d
            };
            
        c["section_"+this.section]=b["section_"+this.section]=!0;
        c.content=t.fill("archive_items",b);
        $(this.el).html(t.fill("board_archive",c));
        this.elArchive=$(this.el).find(".archive-items");
        if(d)for(c=0,b=h.length;c<b;c++)d=h[c],this.elArchive.append(d.getView(Zb,
            null,{
                reOpenText:"Send to Board",
                canDelete:!0
                }).render().el);
        else{
            $(this.el).find(".js-search").hide();
            for(c=0,b=h.length;c<b;c++)d=h[c],this.elArchive.append(d.getView(gb,null,{
                reOpenText:"Send to Board",
                canDelete:!1
                }).render().el)
                }
                this.setSectionLabel(this.section);
        F.calcPos();
        _.delay(function(){
            return $(j.el).find(".js-search").focus().select()
            },20);
        return this
        };
        
    c.prototype.keyupEvent=function(b){
        var c;
        if(!((c=b.keyCode)===pa||c===ka||c===na||c===Sb||c===Y||c===ja||c===X||c===ia))""===$(this.el).find(".js-search").val()?
            this.render():this.debouncedLoadData()
            };
            
    c.prototype.loadData=function(){
        var b,c=this;
        b=$(this.el).find(".js-search").val();
        Models.loadSearchData({
            query:"is:archived "+b,
            modelTypes:"cards",
            idBoards:boardView.model.id,
            partial:!0
            },function(b,e){
            c.results=e;
            b||c.renderSearchResults()
            })
        };
        
    c.prototype.renderSearchResults=function(){
        var b,c,d,h;
        $(this.el).find(".js-more-archive-cards").hide();
        this.elArchive.empty();
        h=null!=(c=this.results.cards)?c:[];
        for(c=0,d=h.length;c<d;c++)b=h[c],b=Models.Card.get(b.id),
            this.elArchive.append(b.getView(Zb,null,{
                reOpenText:"Send to Board",
                canDelete:!0
                }).render().el)
            };
            
    c.prototype.setSectionLabel=function(){
        var b;
        $(this.el).find(".js-current-section").html(""+m.toTitleCase(this.section));
        b="Lists";
        "lists"===this.section&&(b="Cards");
        $(this.el).find(".js-new-section").html(b)
        };
        
    c.prototype.switchSections=function(){
        "cards"===this.section?(this.section="lists",F.removeSpecialClasses(),$(".window").addClass("slim")):(this.section="cards",F.removeSpecialClasses(),$(".window").addClass("archive"));
        this.getData();
        return this.render()
        };
        
    return c
    }(E);
rc=function(d){
    function c(){
        this.render=i(this.render,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.getViewTitle=function(){
        return"Label Names"
        };
        
    c.prototype.tagName="form";
    c.prototype.className="edit-labels js-edit-labels";
    c.prototype.events={
        "submit .js-edit-labels":"saveLabels",
        "click .js-save":"saveLabels",
        "click input['text']":"focus"
    };
    
    c.prototype.render=function(){
        var b,c,d;
        b=this.model.toJSON({
            labels:!0
            });
        c={
            editable:this.model.editable(),
            owned:this.model.owned()
            };
            
        d="board_labels";
        this.model.editable()||(d="board_labels_static");
        $(this.el).html(t.fill(d,b,c));
        return this
        };
        
    c.prototype.focus=function(b){
        return $(b.target).focus().select()
        };
        
    c.prototype.saveLabels=function(b){
        var c,d,g,h,j;
        m.stop(b);
        g={
            labelNames:{}
    };
    
    d=$(this.el).find(".js-label-title");
    n("Board","Save Label Changes");
    for(h=0,j=d.length;h<j;h++)c=d[h],b=$(c).attr("name"),c=$(c).val(),g.labelNames[b]=c;
    this.model.save(g);
    v.popView()
    };
    
return c
}(N);
Ab=db(Pa,function(d){
    function c(){
        this.render=
        i(this.render,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.events={
        "click .js-more-actions":"loadMoreActions"
    };
    
    c.prototype.initialize=function(){
        this.fullHistory=this.options.fullHistory;
        null==this.fullHistory&&(this.fullHistory=!1);
        Models.Action.bind("add:"+this.model.id,_.debounce(this.render,20));
        this.loadMoreActions()
        };
        
    c.prototype.render=function(){
        var b;
        $(this.el).html(t.fill("board_activity",this.model.toJSON()));
        b=$(this.el).find(".list-activity");
        (new Da(this.getActions())).renderTo(b,

        {
            compact:!this.fullHistory,
            key:"boardactivity_"+this.model.id,
            model:this.model
            });
        $(this.el).find(".js-more-actions").toggle(this.hasMoreActions());
        return this
        };
        
    c.prototype.renderActions=function(){
        return this.render()
        };
        
    c.prototype.getActionsFilter=function(){
        return Ba
        };
        
    return c
    }(E));
Qd=function(d){
    function c(){
        this.cancel=i(this.cancel,this);
        this.close=i(this.close,this);
        this.render=i(this.render,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.getViewTitle=function(){
        return"Close Board?"
        };
    c.prototype.events={
        "click .js-close-board":"close",
        "click .js-cancel":"cancel"
    };
    
    c.prototype.render=function(){
        $(this.el).html(t.fill("popover_confirm_close_board"));
        return this
        };
        
    c.prototype.close=function(b){
        m.stop(b);
        v.hide();
        this.model.close();
        n("Board","Close Menu","Successfully Close Board");
        return!1
        };
        
    c.prototype.cancel=function(b){
        m.stop(b);
        v.hide();
        n("Board","Close Menu","Click Cancel Button")
        };
        
    return c
    }(N)
}
C("boardPreference")&&(D={}.hasOwnProperty,u=function(d,c){
    function b(){
        this.constructor=
        d
        }
        for(var e in c)D.call(c,e)&&(d[e]=c[e]);b.prototype=c.prototype;
    d.prototype=new b;
    d.__super__=c.prototype;
    return d
    },y.BoardPreference=function(d){
    function c(){
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.typeName="BoardPreference";
    c.prototype.initialize=function(){
        Api.init(this)
        };
        
    return c
    }($b));
if(C("list")){
    var ac,Jd,Sd,Td,ob,i=function(d,c){
        return function(){
            return d.apply(c,arguments)
            }
        },D={}.hasOwnProperty,u=function(d,c){
    function b(){
        this.constructor=d
        }
        for(var e in c)D.call(c,
        e)&&(d[e]=c[e]);b.prototype=c.prototype;
    d.prototype=new b;
    d.__super__=c.prototype;
    return d
    };
    
ac=function(d){
    function c(){
        this.getBoard=i(this.getBoard,this);
        this.reopen=i(this.reopen,this);
        this.refreshCardList=i(this.refreshCardList,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.typeName="List";
    c.prototype.initialize=function(){
        var b=this;
        Api.init(this);
        this.cardList=new CardList([],{
            model:this
        });
        this.bind("change",this.onChange);
        this.cardList.bind("change:idList",function(c){
            var d;
            d=function(){
                return c.get("idList")!==b.get("id")
                };
                
            if(d())return _.defer(function(){
                if(d())return b.cardList.remove(c)
                    })
            });
        this.bind("changeCards",this.refreshCardList)
        };
        
    c.prototype.postInitialize=function(){
        var b;
        this.refreshCardList();
        null==this.collection&&(b=Models.Board.get(this.get("idBoard")),null!=b&&b.listList.add(this));
        this.setReady()
        };
        
    c.prototype.refreshCardList=function(){
        var b=this;
        return this.cardList.refresh(null!=this.id?_.filter(Models.Card.all(),function(c){
            return c.get("idList")===
            b.id
            })||[]:[])
        };
        
    c.prototype.withIdParents=function(b){
        this.getBoard().onId(function(c){
            b([c])
            })
        };
        
    c.prototype.move=function(b){
        this.set({
            pos:this.getBoard().calcPos(b,this)
            });
        this.save();
        this.collection.sort({
            silent:!0
            })
        };
        
    c.prototype.close=function(){
        this.set({
            closed:!0
            });
        this.save()
        };
        
    c.prototype.reopen=function(){
        ua({
            url:"/1/lists/"+this.id,
            type:"put",
            data:{
                closed:!1,
                pos:this.getBoard().calcPos(this.collection.length,this)
                },
            dataType:"json"
        })
        };
        
    c.prototype.onChange=function(){};
    
    c.prototype.calcPos=
    function(b,c,d){
        return m.calcPos(b,this.cardList,c,function(b){
            return!b.get("closed")
            },d)
        };
        
    c.prototype.getBoard=function(){
        return this.collection.options.model
        };
        
    c.prototype.editable=function(){
        return this.getBoard().editable()
        };
        
    return c
    }(la);
Jd=function(d){
    function c(){
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.model=ac;
    c.prototype.initialize=function(b,c){
        this.options=c;
        this.bind("change:pos",this.sort)
        };
        
    c.prototype.comparator=function(b){
        return b.get("pos")||0
        };
        
    return c
    }(Fa);
ob=function(d){
    function c(){
        this.restoreScroll=i(this.restoreScroll,this);
        this.saveScroll=i(this.saveScroll,this);
        this.eventStopPropagation=i(this.eventStopPropagation,this);
        this.moveList=i(this.moveList,this);
        this.openMenu=i(this.openMenu,this);
        this.sortStop=i(this.sortStop,this);
        this.sortReceive=i(this.sortReceive,this);
        this.triggerOnItem=i(this.triggerOnItem,this);
        this.selectNewCard=i(this.selectNewCard,this);
        this.renderCards=i(this.renderCards,this);
        this.renderName=i(this.renderName,this);
        this.render=
        i(this.render,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.className="list";
    c.prototype.events={
        sortreceive:"sortReceive",
        sortstop:"sortStop",
        "click .js-open-list-menu":"openMenu",
        "mousedown .list-cards":"eventStopPropagation",
        movelist:"moveList",
        dblclick:"eventStopPropagation",
        "click .js-open-card-composer":"openCardComposer"
    };
    
    c.prototype.initialize=function(){
        var b;
        this.model.bind("change:name",this.renderName);
        this.model.view=this;
        b=_.debounce(this.renderCards,
            45);
        this.model.cardList.onAddRemove(b).bind("change:closed",b)
        };
        
    c.prototype.render=function(){
        J("render","rendering list "+this.model.get("name"));
        $(this.el).html(t.fill("list",this.model.toJSON(),{
            editable:this.model.editable()
            }));
        this.renderName().renderCards();
        DragSort.refreshCardSortable();
        return this
        };
        
    c.prototype.renderName=function(){
        $(this.el).find("div.list-title .current").text(this.model.get("name"));
        ListGuide.calc();
        return this
        };
        
    c.prototype.renderCards=function(){
        var b,c;
        J("render","rendering cards for list "+
            this.model.get("name"));
        b=$(this.el).find(".list-cards");
        b.find(".list-card").not(".placeholder").addClass("to-remove");
        c=0<O.newCards.length;
        this.model.cardList.forEach(function(d){
            var g;
            d.get("closed")||(g=d.getView(pb).render().el,$(g).removeClass("to-remove"),b.append(g),c&&$(O.newCards).each(function(b){
                if(d.id===$(O.newCards)[b].id)return $(g).addClass("temp-show")
                    }))
            });
        b.find(".list-card.to-remove").remove();
        boardView.cardComposerState.vis&&boardView.model.getView(da).updatePositionOnBoard({},
            this.selectNewCard);
        ListGuide.calc_num_cards();
        return this
        };
        
    c.prototype.selectNewCard=function(){
        var b,c;
        if(null!=(null!=(b=O.cardToSelect)?b.id:void 0))b=this.model.cardList.filter(function(b){
            return!b.get("closed")
            }),b=_.find(b,function(b){
            return b.id===O.cardToSelect.id
            }),null!=b&&O.selectCard(null!=b?null!=(c=b.view)?c.el:void 0:void 0),O.cardToSelect=null
            };
            
    c.prototype.openCardComposer=function(b){
        m.stop(b);
        v.hide();
        boardView.cardComposerState.pos.idList=this.model.id;
        boardView.cardComposerState.pos.cardPos=
        this.model.cardList.filter(function(b){
            return!b.get("closed")
            }).length;
        boardView.model.getView(da).updatePositionOnBoard();
        n("Card Composer","Open","Via Bottom of List")
        };
        
    c.prototype.triggerOnItem=function(b,c,d){
        var g;
        m.stopPropagation(b);
        boardView.escCancel?boardView.escCancel=!1:(g=this,_.defer(function(){
            return c.item.trigger(d,[c,g])
            }))
        };
        
    c.prototype.sortReceive=function(b,c){
        this.triggerOnItem(b,c,"moveto")
        };
        
    c.prototype.sortStop=function(b,c){
        this.triggerOnItem(b,c,"movein")
        };
        
    c.prototype.openMenu=
    function(b){
        var c;
        c=this.model;
        if(!DragSort.sorting)return m.preventDefault(b),n("List Menu","Open List Menu"),v.toggle({
            elem:b.target,
            top:24,
            view:c.getView(Sd)
            }),!1
        };
        
    c.prototype.moveList=function(b,c){
        this.model.move(c.item.parent().children().index(c.item))
        };
        
    c.prototype.eventStopPropagation=function(b){
        m.stopPropagation(b)
        };
        
    c.prototype.saveScroll=function(){
        this.scrollTop=$(this.el).find(".list-cards").scrollTop()
        };
        
    c.prototype.restoreScroll=function(){
        $(this.el).find(".list-cards").scrollTop(this.scrollTop)
        };
    return c
    }(N);
Sd=function(d){
    function c(){
        this.closeList=i(this.closeList,this);
        this.addCard=i(this.addCard,this);
        this.moveList=i(this.moveList,this);
        this.render=i(this.render,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.getViewTitle=function(){
        return"List Actions"
        };
        
    c.prototype.events={
        "click .js-add-card":"addCard",
        "click .js-move-list":"moveList",
        "click .js-close-list":"closeList"
    };
    
    c.prototype.render=function(){
        $(this.el).html(t.fillMenu("list-menu",this.model.toJSON(),

        {
            editable:this.model.editable()
            }));
        return this
        };
        
    c.prototype.moveList=function(b){
        m.stop(b);
        n("List Menu","Open Move List Popover");
        v.pushView({
            view:this.model.getView(Td)
            })
        };
        
    c.prototype.addCard=function(b){
        m.stop(b);
        v.hide();
        boardView.cardComposerState.pos.idList=this.model.id;
        boardView.cardComposerState.pos.cardPos=0;
        boardView.model.getView(da).updatePositionOnBoard();
        n("List Menu","Add Card");
        n("Card Composer","Open","Via List Menu")
        };
        
    c.prototype.closeList=function(b){
        m.stop(b);
        b=this.model;
        n("List Menu",
            "Archive List");
        v.hide();
        b.close();
        return!1
        };
        
    return c
    }(E);
Td=function(d){
    function c(){
        this.commitChange=i(this.commitChange,this);
        this.updateListList=i(this.updateListList,this);
        this.renderValue=i(this.renderValue,this);
        this.render=i(this.render,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.getViewTitle=function(){
        return"Move List"
        };
        
    c.prototype.events={
        "change .js-select-list-pos":"renderValue",
        "click .js-commit-position":"commitChange"
    };
    
    c.prototype.render=function(){
        var b=
        this;
        $(this.el).html(t.fill("popover_move_list",[]));
        this.updateListList();
        _.defer(function(){
            return b.renderValue()
            });
        return this
        };
        
    c.prototype.renderValue=function(){
        var b;
        b=parseInt($(this.el).find(".js-select-list-pos").val(),10)+1;
        $(".js-pos-value").html(m.getNaturalNumber(""+b))
        };
        
    c.prototype.updateListList=function(){
        var b,c,d,g,h,j,i,o,q,m;
        j=this.model.getBoard().listList.models;
        g=this.model.id;
        c=$(this.el).find(".js-select-list-pos");
        c.empty();
        i=0;
        d=1;
        m=[];
        for(o=0,q=j.length;o<q;o++)h=j[o],
            h.get("closed")||(b=d++,h.id===g&&(b+=" (current)"),b=$("<option>").val(i++).text(b).appendTo(c),h.id===g?m.push(b.attr("selected","selected")):m.push(void 0));
        return m
        };
        
    c.prototype.commitChange=function(b){
        var c;
        m.stop(b);
        b=this.model;
        c=$(this.el).find(".js-select-list-pos");
        c=parseInt(c.find("option:selected").val(),10);
        b.move(c);
        n("List Menu","Move Menu","Successfully Moved");
        v.hide()
        };
        
    return c
    }(N)
}
if(C("card_composer")){
    var da,Xa,Ya,Ja,Za,Ud,i=function(d,c){
        return function(){
            return d.apply(c,
                arguments)
            }
        },D={}.hasOwnProperty,u=function(d,c){
    function b(){
        this.constructor=d
        }
        for(var e in c)D.call(c,e)&&(d[e]=c[e]);b.prototype=c.prototype;
    d.prototype=new b;
    d.__super__=c.prototype;
    return d
    };
    
da=function(d){
    function c(){
        this.clearAndHide=i(this.clearAndHide,this);
        this.hide=i(this.hide,this);
        this.clearItems=i(this.clearItems,this);
        this.openMenu=i(this.openMenu,this);
        this.clearSelectedItems=i(this.clearSelectedItems,this);
        this.renderSelectedItems=i(this.renderSelectedItems,this);
        this.keyupEvent=
        i(this.keyupEvent,this);
        this.pasteEvent=i(this.pasteEvent,this);
        this.submitCard=i(this.submitCard,this);
        this.getListModel=i(this.getListModel,this);
        this.render=i(this.render,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.className="card-composer";
    c.prototype.events={
        "click .js-add-card":"submitCard",
        "click .js-cancel":"clearAndHide",
        "click .js-cc-menu":"openMenu",
        keyup:"keyupEvent",
        paste:"pasteEvent",
        keydown:"keydownEvent"
    };
    
    c.prototype.render=function(b,c){
        var d,g=this;
        boardView.cardComposerState.vis=!0;
        d={};
        
        d.title=boardView.cardComposerState.title;
        $(".card-composer").remove();
        $(this.el).html(t.fill("card_composer_inline",d));
        this.renderSelectedItems();
        this.titleInput=$(this.el).find(".js-card-title");
        _.defer(function(){
            m.setCaretAtEnd(g.titleInput[0]);
            return"function"===typeof c?c():void 0
            });
        _.delay(function(){
            return g.scrollToComposer()
            },50);
        return this
        };
        
    c.prototype.scrollToComposer=function(){
        var b,c,d,g,h,j,i,o;
        h=this.getListModel().view.el;
        $(h).find(".list-card");
        c=$(h).position().left;
        o=$(".list-area").scrollLeft();
        b=$("#board").outerWidth();
        g=$(h).find(".list-cards").scrollTop();
        d=$(h).find(".list-card-area").height();
        i=$(this.el).prop("offsetTop");
        j=$(this.el).outerHeight()+30;
        (o+b<c+$(".list").first().outerWidth()||c<o)&&$(".list-area-wrapper").animate({
            scrollLeft:c
        },100);
        (i>g+d||i+j<g)&&$(h).find(".list-cards").animate({
            scrollTop:i
        },100)
        };
        
    c.prototype.updatePositionOnBoard=function(b,c){
        var d,g,h,j,i;
        i=boardView.cardComposerState.pos;
        g=this.getListModel(i);
        h=g.cardList.filter(function(b){
            return!b.get("closed")
            });
        d=$(g.view.el).find(".list-card");
        g=$(g.view.el).find(".list-cards");
        j=null!=h[i.cardPos-1];
        0===i.cardPos||0===h.length?g.prepend(this.render({},c).el):j?(d=d[i.cardPos-1],$(d).after(this.render({},c).el)):g.append(this.render({},c).el);
        this.delegateEvents()
        };
        
    c.prototype.getListModel=function(b){
        b||(b=boardView.cardComposerState.pos);
        return _.find(Models.Board.get(b.idBoard).listList.models,function(c){
            return c.id===b.idList
            })
        };
        
    c.prototype.submitCard=
    function(b){
        var c,d,g,h,j,i=this;
        m.preventDefault(b);
        j=jQuery.trim(this.titleInput.val());
        ""!==j&&(b=boardView.cardComposerState,d=this.getListModel(b.pos),h={
            name:j,
            pos:d.calcPos(b.pos.cardPos),
            closed:!1,
            idBoard:b.pos.idBoard,
            idList:b.pos.idList
            },b.pos.cardPos+=1,g=_.clone(boardView.cardComposerState.members),c=_.clone(boardView.cardComposerState.labels),this.titleInput.val(""),b.title="",this.clearItems(),d.onId(function(b){
            i.idList=b;
            return d.cardList.create(h,{
                success:function(b){
                    b.onId(function(){
                        O.cardToSelect=
                        b;
                        g.forEach(function(c){
                            var e,c=null!=(e=Models.Member.find("username",c)[0])?e.get("id"):void 0;
                            return b.addMember(c)
                            });
                        c.forEach(function(c){
                            return b.toggleLabel(c)
                            });
                        $("#board").hasClass("filtering")&&($(b.view.el).addClass("temp-show"),O.newCards.push(b));
                        return 0<c.length&&0<g.length?n("Card Composer","Card Added","With Members and Labels"):0<g.length?n("Card Composer","Card Added","With Members"):0<c.length?n("Card Composer","Card Added","With Labels"):n("Card Composer","Card Added","No items included")
                        })
                    }
                })
        }))
    };
c.prototype.pasteEvent=function(){
    $(this.el).find(".js-card-title").focus().keyup()
    };
    
c.prototype.keydownEvent=function(b){
    var c,d,g,h;
    g=$(b.target).closest(".js-card-title").hasClass("js-card-title");
    d=$(b.target).closest(".js-add-card").hasClass("js-add-card");
    if((g||d)&&!v.isVisible()&&b.keyCode===ba)m.stop(b),$(".js-add-card").click();
    else if((h=b.keyCode)===va||h===ba){
        this.titleInput.focus();
        g=m.getWordFromCaret(this.titleInput[0]);
        d=$(null!=(c=v.view)?c.el:void 0);
        c=!1;
        if(v.view instanceof Ja)d.find(".js-members-list .item.selected:first .js-select-member").first().click(),
            c=!0;
        else if(v.view instanceof Ya)d.find(".edit-labels-pop-over .card-label.selected").first().click(),c=!0;
        else if(v.view instanceof Za)0<d.find(".js-pos-results").length&&(d.find(".js-pos-results li.selected:first a").first().click(),c=!0);
        else if(v.view instanceof Xa){
            m.stop(b);
            d.find(".js-card-results .list-card").first().click();
            boardView.cardComposerState.title="";
            return
        }
        c&&(m.stop(b),m.insertSelection(this.titleInput,"",g.start,g.end),boardView.cardComposerState.title=this.titleInput.val());
        this.renderSelectedItems();
        v.hide()
        }
    };

c.prototype.keyupEvent=function(b){
    var c,d,g,h,j,i;
    if(!((d=b.keyCode)===va||d===ba))if(b.keyCode===oa&&this.titleInput.focus(),(g=b.keyCode)===Y||g===ja||g===X||g===ia)m.stop(b),c=$(null!=(i=v.view)?i.el:void 0),v.view instanceof Ja?m.navMenuList(c.find(".js-members-list"),".item",b.keyCode):v.view instanceof Ya?m.navMenuList(c.find(".edit-labels-pop-over"),".card-label",b.keyCode):v.view instanceof Za?0<c.find(".js-pos-results").length&&m.navMenuList(c.find(".js-pos-results"),
        "li",b.keyCode):v.view instanceof Xa&&m.navMenuList(c.find(".js-card-results"),".list-card",b.keyCode);
        else if(!Browser.isTouch()&&$(b.target).closest(".js-card-title").hasClass("js-card-title"))if(i=m.getWordFromCaret(this.titleInput[0]),h=/^@\S/.test(i.str.substring(0,2)),g=/^\#\S/.test(i.str.substring(0,2)),j=/^\^\S/.test(i.str.substring(0,2)),d=/^\%\S/.test(i.str.substring(0,2)),i=i.str.substring(1).toLowerCase(),h||g||j||d){
        if(!((c=b.keyCode)===pa||c===na||c===ka)){
            if(h){
                b=boardView.model.getView(Ja);
                c=_.pluck(boardView.model.memberList.models,"id");
                c=m.filterMembers(i,c);
                return 0<c.length?(v.load(b),b.render(c,!0),v.show({
                    elem:$(".js-cc-menu")[0],
                    top:30,
                    view:b,
                    preloaded:!0
                    }),this.titleInput.focus(),c=$(b.el).find(".js-members-list .item:first"),m.selectMenuItem($(b.el).find(".js-members-list"),".item",c)):v.hide()
                }
                if(g){
                b=boardView.model.getView(Ya);
                c=b.filterLabels(i);
                return 0<c.length?(v.load(b),b.render(c),v.show({
                    elem:$(".js-cc-menu")[0],
                    top:30,
                    view:b,
                    preloaded:!0
                    }),this.titleInput.focus(),
                    c=$(b.el).find(".edit-labels-pop-over .card-label:first"),m.selectMenuItem($(b.el).find(".edit-labels-pop-over"),"li",c)):v.hide()
                }
                if(j){
                b=boardView.model.getView(Za);
                c=b.filterPos(i);
                return c.hasData?(v.load(b),b.renderPosResults(c),v.show({
                    elem:$(".js-cc-menu")[0],
                    top:30,
                    view:b,
                    preloaded:!0
                    }),this.titleInput.focus(),c=$(b.el).find(".js-pos-results li:first"),m.selectMenuItem($(b.el).find(".js-pos-results"),"li",c)):v.hide()
                }
                if(d){
                b=boardView.model.getView(Xa,"fromComposer",{
                    fromComposer:!0
                    });
                v.load(b);
                b.render();
                b.renderResults(i);
                return 0<$(".pop-over .js-card-results .list-card").length?(v.show({
                    elem:$(".js-cc-menu")[0],
                    top:30,
                    view:b,
                    preloaded:!0
                    }),this.titleInput.focus()):v.hide()
                }
            }
    }else return b=$(this.el).find(".js-card-title").val(),boardView.cardComposerState.title=b,v.hide()
        };
        
c.prototype.renderSelectedItems=function(){
    var b,c,d,g,h,j,i,o,q,m;
    i=boardView.cardComposerState;
    j=$(this.el).find(".list-card .list-card-members");
    g=$(this.el).find(".list-card .card-labels");
    if(0<i.labels.length+
        i.members.length){
        if(0<i.members.length){
            b="";
            q=i.members;
            for(d=0,o=q.length;d<o;d++)h=q[d],c=null!=(m=Models.Member.find("username",h)[0])?m.toJSON():void 0,b+="<div class='member js-remove-member' name='"+h+"'>"+t.fill("member",c)+"</div>";
            j.empty();
            j.append(b);
            $(this.el).find(".list-card").css({
                "padding-bottom":30
            })
            }else j.empty(),$(this.el).find(".list-card").css({
            "padding-bottom":0
        });
        if(0<i.labels.length){
            g.empty();
            j=xa.prototype.labels;
            for(c=0,h=j.length;c<h;c++)if(b=j[c],d=_.include(i.labels,
                b))b="<div class='card-label "+b+"-label' name='"+b+"'></div>",g.append(b)
                }
            }else j.empty(),g.empty(),$(this.el).find(".js-clear-all-items").hide(),$(this.el).find(".list-card").css({
    "padding-bottom":0
})
};

c.prototype.clearSelectedItems=function(){
    $(this.el).find(".js-card-title").val("").focus().select();
    this.itemsToAddList=boardView.cardComposerState=[];
    this.renderSelectedItems()
    };
    
c.prototype.openMenu=function(b){
    m.stop(b);
    n("Card Composer","Open Selector Menu");
    return v.toggle({
        elem:$(b.target)[0],
        top:36,
        view:boardView.model.getView(Ud)
        })
    };
    
c.prototype.clearItems=function(){
    boardView.cardComposerState.members=[];
    boardView.cardComposerState.labels=[];
    boardView.cardComposerState.title=null
    };
    
c.prototype.hide=function(){
    $(this.el).remove();
    boardView.cardComposerState.vis=!1
    };
    
c.prototype.clearAndHide=function(){
    this.clearItems();
    return this.hide()
    };
    
return c
}(E);
Ud=function(d){
    function c(){
        this.openCopyFrom=i(this.openCopyFrom,this);
        this.openPosSelector=i(this.openPosSelector,this);
        this.openLabelSelector=
        i(this.openLabelSelector,this);
        this.openMemSelector=i(this.openMemSelector,this);
        this.render=i(this.render,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.getViewTitle=function(){
        return"Options"
        };
        
    c.prototype.events={
        "click .js-mem-selector":"openMemSelector",
        "click .js-label-selector":"openLabelSelector",
        "click .js-pos-selector":"openPosSelector",
        "click .js-copy-from":"openCopyFrom"
    };
    
    c.prototype.render=function(){
        $(this.el).html(t.fill("popover_selector_menu"));
        return this
        };
    c.prototype.openMemSelector=function(b){
        m.stop(b);
        return v.pushView({
            view:boardView.model.getView(Ja)
            })
        };
        
    c.prototype.openLabelSelector=function(b){
        m.stop(b);
        return v.pushView({
            view:boardView.model.getView(Ya)
            })
        };
        
    c.prototype.openPosSelector=function(b){
        m.stop(b);
        return v.pushView({
            view:boardView.model.getView(Za)
            })
        };
        
    c.prototype.openCopyFrom=function(b){
        m.stop(b);
        return v.pushView({
            view:boardView.model.getView(Xa)
            })
        };
        
    return c
    }(E);
Ja=function(d){
    function c(){
        this.addOrRemoveMember=i(this.addOrRemoveMember,
            this);
        this.keyupEvent=i(this.keyupEvent,this);
        this.hoverMemberSelect=i(this.hoverMemberSelect,this);
        this.filterAndFillMembers=i(this.filterAndFillMembers,this);
        this.fillMems=i(this.fillMems,this);
        this.render=i(this.render,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.getViewTitle=function(){
        return"Select Members"
        };
        
    c.prototype.events={
        "hover .item":"hoverMemberSelect",
        "click .item":"addOrRemoveMember",
        keyup:"keyupEvent"
    };
    
    c.prototype.render=function(b,c){
        var d,g=this;
        b||(b=_.pluck(boardView.model.memberList.models,"id"));
        d={
            showSearch:!0
            };
            
        if(5>=b.length||c)d.showSearch=!1;
        $(this.el).html(t.fill("popover_member_searcher",d));
        this.fillMems(b);
        0<$(this.el).find(".js-filter-members").length&&_.delay(function(){
            return $(g.el).find(".js-filter-members").focus().select()
            },20);
        return this
        };
        
    c.prototype.fillMems=function(b){
        var c,d,g,h,j;
        $(this.el).find(".js-members-list").empty();
        g=[];
        boardView.cardComposerState.members.forEach(function(b){
            var c;
            if(RegExp("^"+b+"$").test(b))return b=
                null!=(c=Models.Member.find("username",b)[0])?c.get("id"):void 0,g.push(b)
                });
        b=b.slice(0,5);
        for(h=0,j=b.length;h<j;h++)d=b[h],c=Models.Member.get(d).toJSON(),_.include(g,d)&&(c.isActive=!0),$(this.el).find(".js-members-list").append(t.fill("select_member",c,{},{
            member:t.member
            }))
        };
        
    c.prototype.filterAndFillMembers=function(b){
        var c;
        c=_.pluck(boardView.model.memberList.models,"id");
        b=m.filterMembers(b,c);
        0<b.length?(this.fillMems(b),b=$(this.el).find(".js-members-list .item:first"),m.selectMenuItem($(this.el).find(".js-members-list"),
            ".item",b)):$(this.el).find(".js-members-list").html("<li><p class='empty'>No matched members</p></li>")
        };
        
    c.prototype.hoverMemberSelect=function(b){
        b=$(b.target).closest(".item");
        return m.selectMenuItem($(this.el).find(".js-members-list"),".item",b)
        };
        
    c.prototype.keyupEvent=function(b){
        var c,d,g;
        c=$(".js-filter-members").val().trim().toLowerCase();
        (d=b.keyCode)===va||d===ba?(m.stop(b),$(this.el).find(".js-members-list .item.selected:first .js-select-member").first().click()):(g=b.keyCode)===Y||g===
        X?(m.stop(b),m.navMenuList($(this.el).find(".js-members-list"),".item",b.keyCode)):this.filterAndFillMembers(c)
        };
        
    c.prototype.addOrRemoveMember=function(b){
        m.stop(b);
        b=$(b.target).closest(".item");
        b.toggleClass("active");
        b=b.find(".username").text();
        _.include(boardView.cardComposerState.members,b)?(boardView.cardComposerState.members=_.without(boardView.cardComposerState.members,b),n("Card Composer","Remove Member")):(boardView.cardComposerState.members.push(b),n("Card Composer","Add Member"));
        boardView.model.getView(da).renderSelectedItems()
        };
    return c
    }(E);
Ya=function(d){
    function c(){
        this.addOrRemoveLabel=i(this.addOrRemoveLabel,this);
        this.hoverLabelSelect=i(this.hoverLabelSelect,this);
        this.filterLabels=i(this.filterLabels,this);
        this.render=i(this.render,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.getViewTitle=function(){
        return"Select Labels"
        };
        
    c.prototype.events={
        "hover .item":"hoverLabelSelect",
        "click .card-label":"addOrRemoveLabel"
    };
    
    c.prototype.render=function(b){
        var c,d,g,h,j,i;
        h=[];
        b||(b=xa.prototype.labels);
        d=boardView.cardComposerState.labels;
        for(j=0,i=b.length;j<i;j++)c=b[j],g=_.include(d,c),h.push({
            color:c,
            name:boardView.model.getLabelName(c),
            isActive:g
        });
        b={
            labels:h,
            hideEditTitles:!0
            };
            
        $(this.el).html(t.fill("popover_change_labels",b));
        return this
        };
        
    c.prototype.filterLabels=function(b){
        var c,d,g,h,j,i;
        g=RegExp("^"+b);
        c=[];
        i=xa.prototype.labels;
        for(h=0,j=i.length;h<j;h++)b=i[h],d=boardView.model.getLabelName(b).toLowerCase().split(" "),d.push(b),_.detect(d,function(b){
            return g.test(b)
            })&&c.push(b);
        return c
        };
        
    c.prototype.hoverLabelSelect=function(b){
        b=$(b.target).closest(".card-label");
        return m.selectMenuItem($(this.el).find(".edit-labels-pop-over"),".card-label",b)
        };
        
    c.prototype.addOrRemoveLabel=function(b){
        m.stop(b);
        b=$(b.target).closest(".card-label");
        b.toggleClass("active");
        b=b.attr("label");
        _.include(boardView.cardComposerState.labels,b)?(boardView.cardComposerState.labels=_.without(boardView.cardComposerState.labels,b),n("Card Composer","Remove Label")):(boardView.cardComposerState.labels.push(b),
            n("Card Composer","Add Label"));
        boardView.model.getView(da).renderSelectedItems()
        };
        
    return c
    }(E);
Za=function(d){
    function c(){
        this.changePosition=i(this.changePosition,this);
        this.changeList=i(this.changeList,this);
        this.updatePositionList=i(this.updatePositionList,this);
        this.updateListList=i(this.updateListList,this);
        this.renderPosResults=i(this.renderPosResults,this);
        this.filterPos=i(this.filterPos,this);
        this.selectPosResult=i(this.selectPosResult,this);
        this.hoverPosResultsSelect=i(this.hoverPosResultsSelect,
            this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.getViewTitle=function(){
        return"Select Position"
        };
        
    c.prototype.events={
        "change .js-select-list":"changeList",
        "change .js-select-position":"changePosition",
        "hover .js-pos-results li":"hoverPosResultsSelect",
        "click .js-select-pos-keyword":"selectPosResult",
        "click .js-select-pos-pos":"selectPosResult",
        "click .js-select-pos-list":"selectPosResult"
    };
    
    c.prototype.render=function(){
        this.composerView=boardView.model.getView(da);
        $(this.el).html(t.fill("popover_change_position"));
        this.updateListList();
        return this
        };
        
    c.prototype.hoverPosResultsSelect=function(b){
        b=$(b.target).closest("li");
        return m.selectMenuItem($(this.el).find(".js-pos-results"),"li",b)
        };
        
    c.prototype.selectPosResult=function(b){
        var c,d,g;
        m.stop(b);
        d=$(b.target).closest("a");
        g=d.attr("name");
        b=boardView.cardComposerState.pos;
        c=this.composerView.getListModel().cardList.filter(function(b){
            return!b.get("closed")
            }).length+1;
        d.hasClass("js-select-pos-keyword")?"top"===g?(b.cardPos=0,n("Card Composer","Select Position in List by Autocomplete",
            'Top of List - Used "Top"')):"bottom"===g&&(b.cardPos=c,n("Card Composer","Select Position in List by Autocomplete",'Bottom of List - Used "Bottom"')):d.hasClass("js-select-pos-pos")?(b.cardPos=parseInt(g,10)-1,n("Card Composer","Select Position in List by Autocomplete","Selected Position - Used Number")):d.hasClass("js-select-pos-list")&&(c=this.composerView.getListModel().cardList.filter(function(b){
            return!b.get("closed")
            }).length===b.cardPos,b.idList=g,c?(b.cardPos=this.composerView.getListModel().cardList.filter(function(b){
            return!b.get("closed")
            }).length,
        n("Card Composer","Select List by Autocomplete","Bottom")):n("Card Composer","Select List by Autocomplete","Not Bottom"));
        v.hide();
        this.composerView.hide();
        this.composerView.updatePositionOnBoard()
        };
        
    c.prototype.filterPos=function(b){
        var c,d,g,h,j,i;
        j=RegExp("^"+b);
        b=RegExp("^"+b+"$");
        this.composerView=boardView.model.getView(da);
        g={
            keywordList:[],
            posList:[],
            listList:[]
        };
        
        c=this.composerView.getListModel().cardList.filter(function(b){
            return!b.get("closed")
            });
        for(d=h=0,c=c.length;0<=c?h<=c:h>=c;d=0<=
            c?++h:--h)d+=1,b.test(""+d)&&g.posList.push(d);
        _.each(["top","bottom"],function(b){
            if(j.test(b))return g.keywordList.push(b)
                });
        i=boardView.options.model.listList.models;
        for(d=0,c=i.length;d<c;d++)b=i[d],b.get("closed")||(h=_.compact(b.get("name").toLowerCase().split(/\s+/)),_.detect(h,function(b){
            return j.test(b)
            })&&g.listList.push(b.toJSON()));
        0<g.keywordList.length+g.posList.length+g.listList.length&&(g.hasData=!0);
        return g
        };
        
    c.prototype.renderPosResults=function(b){
        var c,d,g,h,j,i,o,q,n;
        this.composerView=
        boardView.model.getView(da);
        n=this.composerView.getListModel();
        g=boardView.cardComposerState.pos.cardPos+1;
        j="of";
        1===g?i="Top":g===n.cardList.filter(function(b){
            return!b.get("closed")
            }).length+1?i="Bottom":(i=m.getNaturalNumber(""+g),j="in");
        d=[];
        q=b.keywordList;
        for(h=0,o=q.length;h<o;h++)c=q[h],c={
            value:c,
            natural:""+(c.charAt(0).toUpperCase()+c.substring(1))
            },d.push(c);
        h=[];
        c=b.posList;
        for(o=0,q=c.length;o<q;o++)g=c[o],g={
            value:g,
            natural:""+m.getNaturalNumber(""+g)
            },h.push(g);
        b={
            currentListName:n.get("name"),
            currentListId:n.id,
            currentPos:i,
            currentPosPrep:j,
            keywordList:d,
            posList:h,
            listList:b.listList
            };
            
        $(this.el).html(t.fill("popover_filter_pos_results",b))
        };
        
    c.prototype.updateListList=function(){
        var b,c,d,g,h,j,i,o;
        d=this.composerView.getListModel();
        g=d.id;
        d=d.getBoard();
        c=$(this.el).find(".js-select-list");
        c.empty();
        o=_.sortBy(d.listList.models,function(b){
            return b.get("pos")
            });
        for(j=0,i=o.length;j<i;j++)d=o[j],d.get("closed")||(b=h=d.get("name"),d.id===g&&(b+=" (selected)"),b=$("<option value='"+d.id+
            "'>"+_.escape(b)+"</option>"),c.append(b),d.id===g&&(b.attr("selected","selected"),$(this.el).find(".js-list-value").text(h)));
        return this.updatePositionList()
        };
        
    c.prototype.updatePositionList=function(){
        var b,c,d,g,h,j,i,o,q;
        c=$(this.el).find(".js-select-list");
        d=$(this.el).find(".js-select-position");
        h=c.find("option:selected").val();
        d.empty();
        _.detect(boardView.model.listList.models,function(b){
            var c;
            return null!=(c=b.id===h)?c:board.listList.models[0]
            });
        c=this.composerView.getListModel().cardList.filter(function(b){
            return!b.get("closed")
            });
        boardView.cardComposerState.pos.cardPos>c.length&&(boardView.cardComposerState.pos.cardPos=c.length+1);
        if(0===c.length)b=$("<option>").val("0").text("1").appendTo(d),$(this.el).find(".js-pos-value").html(m.getNaturalNumber("1"));else for(g=o=0,q=c.length;0<=q?o<=q:o>=q;g=0<=q?++o:--o)b=i=""+(g+1),j=!1,0<c.length&&(0===g?b+=" (top)":g===c.length&&(b+=" (bottom)")),g===boardView.cardComposerState.pos.cardPos&&(j=!0),b=$("<option>").val(g).text(b).appendTo(d),j&&(b.attr("selected","selected"),$(this.el).find(".js-pos-value").html(m.getNaturalNumber(i)))
            };
    c.prototype.changeList=function(){
        var b,c,d;
        d=boardView.cardComposerState.pos;
        c=this.composerView.getListModel().cardList.filter(function(b){
            return!b.get("closed")
            }).length===d.cardPos;
        b=$(this.el).find(".js-select-list").find("option:selected").val();
        d.idList=b;
        c?(d.cardPos=this.composerView.getListModel().cardList.filter(function(b){
            return!b.get("closed")
            }).length,n("Card Composer","Change Position by Click","Change List - Bottom")):n("Card Composer","Change Position by Click","Change List - Not Bottom");
        v.hide();
        this.composerView.hide();
        this.composerView.updatePositionOnBoard()
        };
        
    c.prototype.changePosition=function(){
        var b;
        b=$(this.el).find(".js-select-position");
        b=parseInt(b.find("option:selected").val(),10);
        boardView.cardComposerState.pos.cardPos=b;
        n("Card Composer","Change Position by Click","Change Position in List");
        v.hide();
        this.composerView.hide();
        this.composerView.updatePositionOnBoard()
        };
        
    return c
    }(E);
Xa=function(d){
    function c(){
        this.chooseCard=i(this.chooseCard,this);
        this.selectCard=i(this.selectCard,
            this);
        this.renderResults=i(this.renderResults,this);
        this.keydownEvent=i(this.keydownEvent,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.getViewTitle=function(){
        return"Copy From..."
        };
        
    c.prototype.events={
        "click .list-card":"chooseCard",
        "hover .list-card":"selectCard"
    };
    
    c.prototype.render=function(){
        var b,c,d,g,h,j,i,o=this;
        c={};
        
        c.showInput=!this.options.fromComposer;
        $(this.el).html(t.fill("card_copy_from",c));
        this.options.fromComposer||(this.input=$(this.el).find(".js-input"),
            _.delay(function(){
                return o.input.keydown(_.debounce(o.keydownEvent,150))
                },20));
        this.cards=[];
        j="undefined"!==typeof boardView&&null!==boardView?boardView.model.listList.models:void 0;
        for(c=0,g=j.length;c<g;c++)if(b=j[c],!b.get("closed")){
            i=b.cardList.models;
            for(d=0,h=i.length;d<h;d++)b=i[d],b.get("closed")||this.cards.push(b)
                }
                return this
        };
        
    c.prototype.keydownEvent=function(b){
        var c;
        m.stop(b);
        b.keyCode===ba?$(this.el).find(".list-card.selected").first().click():(c=b.keyCode)===Y||c===X?m.navMenuList($(this.el).find(".js-card-results"),
            ".list-card",b.keyCode):""===this.input.val().trim()?$(".js-card-results").empty():this.renderResults()
        };
        
    c.prototype.renderResults=function(b){
        var c,d,g,h,j,i,o,q,n,u,s,x;
        d=$(this.el).find(".js-card-results");
        i=/[\s\x21-\x22\x24-\x2F\x3A-\x40\x5B-\x60\x7B-\x7F]+/;
        j=/[\x21-\x22\x24-\x2F\x3A-\x40\x5B-\x60\x7B-\x7F]+/;
        if(b)u=RegExp("^("+b+")");
        else{
            b=this.input.val().trim().toLowerCase();
            b=b.replace(j,"");
            if(""===b)return;
            b=b.split(/\s+/);
            u=RegExp("^("+b.join("|")+")")
            }
            c=$(".js-card-results");
        c.empty();
        j=[];
        q=this.cards;
        for(h=0,o=q.length;h<o;h++)b=q[h],n=_.compact(b.get("name").toLowerCase().split(i)),n.join("|"),_.detect(n,function(b){
            return u.test(b)
            })&&j.push(b);
        if(0===j.length)c.append("<p class='empty'>No results</p>");
        else{
            n=j.slice(0,5);
            for(b=0,j=n.length;b<j;b++){
                i=n[b];
                c=i.toJSON();
                c.url="#";
                c.labels=i.getLabels();
                c=$("<div class='list-card clearfix' cardId='"+c.id+"'> "+t.fill("card_in_list",c)+" </div>");
                q=i.memberList.models;
                h=c.find(".list-card-members");
                for(s=0,x=q.length;s<x;s++)o=
                    q[s],h.append("<div class='member'>            "+t.fill("member",o.toJSON())+"          </div>");
                g=c.find(".badges");
                i.badgeList.forEach(function(b){
                    b.get("isArchived")||(b=b.getView(Qa,"cardcopy"),g.append(b.render().el))
                    });
                d.append(c)
                }
                m.selectMenuItem(d,".list-card",d.find(".list-card").first());
            v.calcTop()
            }
        };
    
c.prototype.selectCard=function(b){
    var c;
    c=$(this.el).find(".js-card-results");
    m.selectMenuItem(c,".list-card",$(b.target).closest(".list-card"))
    };
    
c.prototype.chooseCard=function(b){
    n("Card Composer",
        "Select Card to Copy");
    b=$(b.target).closest(".list-card").attr("cardId");
    v.pushView({
        view:Models.Card.get(b).getView(qb)
        })
    };
    
return c
}(E)
}
if(C("card")){
    var xa,qb,Vd,Db,Eb,sc,tc,pb,Wd,i=function(d,c){
        return function(){
            return d.apply(c,arguments)
            }
        },D={}.hasOwnProperty,u=function(d,c){
    function b(){
        this.constructor=d
        }
        for(var e in c)D.call(c,e)&&(d[e]=c[e]);b.prototype=c.prototype;
    d.prototype=new b;
    d.__super__=c.prototype;
    return d
    },aa=[].indexOf||function(d){
    for(var c=0,b=this.length;c<b;c++)if(c in this&&
        this[c]===d)return c;return-1
    },W=[].slice;
xa=function(d){
    function c(){
        this.markRelatedNotificationsRead=i(this.markRelatedNotificationsRead,this);
        this.getCheckItem=i(this.getCheckItem,this);
        this.subscribe=i(this.subscribe,this);
        this.getVoterDisplayData=i(this.getVoterDisplayData,this);
        this.vote=i(this.vote,this);
        this.addComment=i(this.addComment,this);
        this.getUrl=i(this.getUrl,this);
        this.getList=i(this.getList,this);
        this.getIndexInList=i(this.getIndexInList,this);
        this.getBoard=i(this.getBoard,this);
        this.reopen=i(this.reopen,this);
        this.close=i(this.close,this);
        this.hasChecklist=i(this.hasChecklist,this);
        this.removeChecklist=i(this.removeChecklist,this);
        this.addChecklist=i(this.addChecklist,this);
        this.hasMember=i(this.hasMember,this);
        this.removeMember=i(this.removeMember,this);
        this.addMember=i(this.addMember,this);
        this.moveToList=i(this.moveToList,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.typeName="Card";
    c.prototype.initialize=function(){
        Api.init(this)
        };
        
    c.prototype.postInitialize=
    function(){
        var b,c,d,g,h,j,i=this;
        this.memberList=new jb([],{
            model:this
        });
        this.memberVotedList=new jb([],{
            model:this
        });
        this.checkItemStateList=new Xd(this.get("checkItemStates")||[],{
            model:this
        });
        this.checklistList=new pc([],{
            model:this
        });
        this.attachmentList=new Yd([],{
            model:this
        });
        g=function(){
            i.memberList.refresh(Models.Member.getList(i.get("idMembers")||[]),{
                model:i
            })
            };
            
        h=function(){
            i.memberVotedList.refresh(Models.Member.getList(i.get("idMembersVoted")||[]),{
                model:i
            })
            };
            
        d=function(){
            var b;
            b=_.map(i.get("idChecklists")||
                [],function(b){
                    return i.getBoard().getChecklist(b)
                    }).filter(function(b){
                return null!=b
                });
            i.checklistList.refresh(b,{
                model:i
            })
            };
            
        c=function(){
            i.checkItemStateList.refresh(i.get("checkItemStates")||[],{
                model:i
            })
            };
            
        b=function(){
            i.attachmentList.refresh(i.get("attachments")||[],{
                model:i
            })
            };
            
        j=function(){
            var b;
            b=i.get("labels");
            if(!_.isString(null!=b?b[0]:void 0))return i.set("labels",_.pluck(b,"color"),{
                silent:!0
                })
            };
            
        g();
        h();
        d();
        c();
        b();
        j();
        this.bind("change:idMembers",g);
        this.bind("change:idMembersVoted",
            h);
        this.bind("change:idMembersVoted",function(){
            var b,c,e,d;
            if(null!=(c=i.get("idMembersVoted")))b=i.get("badges"),b.votes=c.length,b.viewingMemberVoted=(e=null!=(d=z.me())?d.id:void 0,0<=aa.call(c,e)),i.trigger("change:badges")
                });
        this.bind("change:idChecklists",d);
        this.bind("change:checkItemStates",c);
        this.bind("change:attachments",b);
        this.bind("change:labels",j);
        this.bind("change:idList",function(b){
            var c,e;
            e=b.getList();
            c=b.getBoard().getList(b.get("idList"));
            e.cardList.remove(b);
            c.cardList.add(b)
            });
        this.badgeList=new Zd([],{
            model:this
        });
        this.get("idMembersVoted")||this.set("idMembersVoted",[],{
            silent:!0
            });
        this.setReady()
        };
        
    c.prototype.withIdParents=function(b){
        var c;
        c=this.getList();
        c.onId(function(d){
            b([d,c.getBoard().id])
            })
        };
        
    c.prototype.moveToList=function(b,c){
        var d;
        d=this;
        b.onId(function(g){
            var h;
            h=b.calcPos(c,d);
            if(!(h===d.pos&&d.get("idList")===g))return h={
                pos:h
            },g!==d.get("idList")&&(h.idList=g),d.updateNew(h)
                })
        };
        
    c.prototype.moveToNextList=function(){
        var b,c;
        c=this.getBoard().listList.filter(function(b){
            return!b.get("closed")
            });
        b=_.indexOf(c,this.getList());
        b<c.length-1&&this.moveToList(c[b+1],1E9)
        };
        
    c.prototype.moveToPrevList=function(){
        var b,c;
        c=this.getBoard().listList.filter(function(b){
            return!b.get("closed")
            });
        b=_.indexOf(c,this.getList());
        0<b&&this.moveToList(c[b-1],1E9)
        };
        
    c.prototype.addMember=function(b){
        var c;
        c=$("#board");
        this.hasMember(b)||(this.addToSet("idMembers",b),this.save(),0<c.length&&(b=Models.Member.get(b).get("username"),$(this.view.el).addClass("assigned-to-"+b),S.refreshFilters()),!0);
        return!1
        };
        
    c.prototype.removeMember=
    function(b){
        var c;
        c=$("#board");
        this.hasMember(b)&&(this.pull("idMembers",b),this.save(),0<c.length&&(b=Models.Member.get(b).get("username"),$(this.view.el).removeClass("assigned-to-"+b),S.refreshFilters()),!0);
        return!1
        };
        
    c.prototype.toggleMember=function(b){
        this.hasMember(b)?this.removeMember(b):this.addMember(b)
        };
        
    c.prototype.hasMember=function(b){
        return this.memberList.get(b)
        };
        
    c.prototype.addChecklist=function(b){
        this.hasChecklist(b)||(this.addToSet("idChecklists",b),this.save(),!0);
        return!1
        };
        
    c.prototype.removeChecklist=
    function(b){
        this.hasChecklist(b)&&(this.pull("idChecklists",b),this.save(),!0);
        return!1
        };
        
    c.prototype.getIdCardMems=function(){
        return _.map(this.memberList.models,function(b){
            return b.id
            })
        };
        
    c.prototype.getIdCommenters=function(){
        var b;
        b=[];
        _.each(Models.Action.getListForModel(this),function(c){
            if("commentCard"===c.get("type"))return c=c.get("idMemberCreator"),b.push(c)
                });
        return this.idCommenters=_.uniq(b)
        };
        
    c.prototype.hasChecklist=function(b){
        return this.checklistList.get(b)
        };
        
    c.prototype.close=function(){
        this.set({
            closed:!0
            });
        this.save()
        };
        
    c.prototype.reopen=function(){
        var b;
        b=this.getList();
        null!=b&&(this.set({
            closed:!1,
            pos:b.calcPos(b.cardList.length,this)
            }),this.save())
        };
        
    c.prototype.getBoard=function(){
        this.board||(this.board=Models.Board.get(this.get("idBoard")));
        return this.board
        };
        
    c.prototype.getIndexInList=function(){
        return _.indexOf(this.getList().cardList.models,this)
        };
        
    c.prototype.getList=function(){
        return this.getBoard().listList.get(this.get("idList"))
        };
        
    c.prototype.getUrl=function(){
        return Controller.getCardUrl(this)
        };
    c.prototype.editable=function(){
        return this.getBoard().editable()
        };
        
    c.prototype.refreshChecklists=function(){
        var b=this;
        this.checklistList.refresh(_.map(this.get("idChecklists")||[],function(c){
            return b.getBoard().getChecklist(c)
            }).filter(function(b){
            return null!=b
            }),{
            model:this
        })
        };
        
    c.prototype.addComment=function(b){
        var c;
        c=this;
        if(""!==b)c.onId(function(d){
            var g;
            g=_.uniqueId("placeholder");
            return c.withIdParents(function(){
                var h,j,i,o;
                j=c.getBoard();
                h=new Ra({
                    id:g,
                    type:"commentCard",
                    data:{
                        text:b,
                        card:{
                            id:c.id,
                            name:c.get("name")
                            },
                        board:{
                            id:j.id,
                            name:j.get("name")
                            }
                        },
                idMemberCreator:z.myId(),
                    version:1
                });
            Models.Action.add(h);
                i=function(b){
                Models.Action.remove(g,b);
                setTimeout(function(){
                    return h.destroy()
                    },1E4);
                return Models.Action.unbind("add:"+d,o)
                };
                
            o=function(){
                return i(!1)
                };
                
            j=function(){
                return i(!0)
                };
                
            setTimeout(h.takingTooLong,2E3);
                c.api.addComment(b,j,j);
                return Models.Action.bind("add:"+d,o)
                })
        })
        };
        
c.prototype.vote=function(b){
    var c;
    b!==this.voted&&this.getBoard().canVote(z.me())&&(c="/1/cards/"+
        this.id+"/membersVoted",b?ua({
            url:c,
            type:"post",
            data:{
                value:z.me().id
                },
            dataType:"json",
            error:function(b){
                return"undefined"!==typeof console&&null!==console?"function"===typeof console.error?console.error(b):void 0:void 0
                }
            }):ua({
        url:""+c+"/"+z.me().id,
        type:"delete",
        dataType:"json",
        error:function(b){
            return"undefined"!==typeof console&&null!==console?"function"===typeof console.error?console.error(b):void 0:void 0
            }
        }),c=this.get("badges"),c.viewingMemberVoted=b,c.votes+=b?1:-1,this.trigger("change:badges"))
};
c.prototype.voted=function(){
    var b;
    return null!=(b=this.get("badges"))?b.viewingMemberVoted:void 0
    };
    
c.prototype.getVoterDisplayData=function(b){
    return this.api.getVoterDisplayData({},function(c){
        Models.Member.update(c.members);
        return b()
        },function(){})
    };
    
c.prototype.toggleVote=function(){
    this.vote(!this.voted())
    };
    
c.prototype.subscribe=function(b){
    var c;
    b!==this.get("subscribed")&&(c="/1/cards/"+this.id+"/subscribed",this.get("badges").subscribed=b,ua({
        url:c,
        type:"put",
        data:{
            value:b
        },
        dataType:"json",
        error:function(b){
            return"undefined"!==typeof console&&null!==console?"function"===typeof console.error?console.error(b):void 0:void 0
            }
        }))
};

c.prototype.getCheckItem=function(b){
    var c,d,g,h;
    for(c=d=0,g=this.checklistList.length-1;0<=g?d<=g:d>=g;c=0<=g?++d:--d)if(c=this.checklistList.at(c),c=null!=c?null!=(h=c.checkItemList)?h.get(b):void 0:void 0)return c;return null
    };
    
c.prototype.labels="green,yellow,orange,red,purple,blue".split(",");
c.prototype.getLabels=function(){
    var b,c,d,g,h;
    g=this.labels;
    h=[];
    for(c=0,d=g.length;c<d;c++)b=g[c],h.push(this.getLabel(b));
    return h
    };
    
c.prototype.hasLabel=function(b){
    return _.include(this.get("labels"),b)
    };
    
c.prototype.setLabel=function(b,c){
    c?this.addToSet("labels",b):this.pull("labels",b);
    this.save()
    };
    
c.prototype.getLabel=function(b){
    return{
        shortcut:String.fromCharCode(49+_.indexOf(this.labels,b)),
        color:b,
        name:this.getBoard().getLabelName(b),
        isActive:this.hasLabel(b)
        }
    };

c.prototype.toggleLabel=function(b){
    this.setLabel(b,!this.hasLabel(b))
    };
    
c.prototype.markRelatedNotificationsRead=
function(){
    var b,c,d,g,h,j;
    g=Models.Notification.all();
    j=[];
    for(c=0,d=g.length;c<d;c++)b=g[c],b.get("unread")&&(null!=(h=b.get("data").card)?h.id:void 0)===this.id&&j.push(b.markRead());
    return j
    };
    
c.prototype.toJSON=function(b){
    var e;
    null==b&&(b={});
    e=c.__super__.toJSON.apply(this,arguments);
    b.url&&(e.url=Controller.getCardUrl(this));
    return e
    };
    
return c
}(la);
y.CardList=Fa.extend({
    model:xa,
    initialize:function(d,c){
        this.options=c;
        this.bind("change:pos",this.sort)
        },
    comparator:function(d){
        return d.get("pos")||
        0
        }
    });
pb=function(d){
    function c(){
        this.doClicks=i(this.doClicks,this);
        this.showDetail=i(this.showDetail,this);
        this.selectCard=i(this.selectCard,this);
        this.moveIn=i(this.moveIn,this);
        this.moveTo=i(this.moveTo,this);
        this.openCardMenu=i(this.openCardMenu,this);
        this.render=i(this.render,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.className="list-card js-member-droppable clearfix";
    c.prototype.events={
        moveto:"moveTo",
        movein:"moveIn",
        "click .js-card-menu":"openCardMenu",
        click:"showDetail",
        mouseover:"selectCard"
    };
    
    c.prototype.initialize=function(){
        this.model.bind("change",this.render);
        this.model.view=this;
        this.model.memberList.onAddRemove(this.render);
        this.model.badgeList.bind("refresh",this.render);
        this.model.getBoard().bind("change:labelNames",this.render)
        };
        
    c.prototype.render=function(){
        var b,c,d,g,h=this;
        g=this.model;
        J("render","rendering card "+g.get("name"));
        b=g.toJSON();
        b.labels=g.getLabels();
        b.url=Controller.getCardUrl(this.model);
        $(this.el).html(t.fill("card_in_list",
            b,{
                editable:this.model.editable()
                }));
        b.members=g.memberList.models;
        b.members.forEach(function(b){
            b="assigned-to-"+b.get("username");
            $(h.el).addClass(b)
            });
        $(this.el).removeClass("red-label orange-label yellow-label green-label blue-label purple-label");
        b.labels.forEach(function(b){
            b.isActive&&(b=b.color+"-label",$(h.el).addClass(b))
            });
        Browser.isTouch()||$(this.el).droppable({
            refreshPositions:!0,
            inBounds:function(b){
                var c,e,d,f;
                c=$("#board");
                e=c.offset();
                return e.left<(d=b.pageX)&&d<e.left+c.width()&&
                e.top<(f=b.pageY)&&f<e.top+c.height()
                },
            accept:".js-list-board-members .member",
            drop:function(b,c){
                var e;
                e=c.draggable.data("id");
                c.draggable.clone();
                g.memberList.detect(function(b){
                    return b.id===e
                    })||(g.addMember(e),n("Card","Add Member by Board Sidebar"))
                }
            });
    d=$(this.el).find(".list-card-members");
    this.model.memberList.forEach(function(b){
        b=b.getView(jc,"card_"+g.cid,{
            parent:g
        });
        d.prepend(b.render().el)
        });
    c=$(this.el).find(".badges");
    this.model.badgeList.forEach(function(b){
        b=b.getView(Qa,"card");
        c.append(b.render().el)
        });
    $(this.el).data("card",g);
    return this
    };
    
c.prototype.openCardMenu=function(b){
    m.stop(b);
    n("Card Menu","Open Card Menu","On Board View");
    v.toggle({
        elem:b.target,
        top:23,
        view:this.model.getView(sc)
        })
    };
    
c.prototype.moveTo=function(b,c,d){
    b=c.item.parent().children(".list-card:not(.placeholder)").index(c.item);
    this.model.idList=d.id;
    this.model.moveToList(d.model,b)
    };
    
c.prototype.moveIn=function(b,c,d){
    d.model.id===this.model.get("idList")&&this.moveTo(b,c,d)
    };
    
c.prototype.selectCard=
function(){
    O.fMouseSelect&&O.selectCard(this.el)
    };
    
c.prototype.showDetail=function(b,c){
    var d,g,h,j=this;
    this.model.markRelatedNotificationsRead();
    Models.Notification.unbind("add",this.model.markRelatedNotificationsRead);
    Models.Notification.bind("add",this.model.markRelatedNotificationsRead);
    if(_.isFunction(b))d=b;
    else{
        if((g=b)&&(g.ctrlKey||g.metaKey||g.shiftKey))return;
        h=Controller.title;
        d=function(b){
            b||(Controller.goBack(),Controller.setLocation({
                title:h
            }))
            }
        }
    if(null!=g){
    if(g.isPropagationStopped())return;
    g.isDefaultPrevented()||m.stop(g)
    }
    if(!this.doClicks())return!1;
R.cancelEdits();
boardView.model.getView(da).hide();
n("Board","Open Card Detail");
F.show({
    view:this.model.getView(Vd),
    hide:function(){
        var b;
        b=1<=arguments.length?W.call(arguments,0):[];
        Models.Notification.unbind("add",j.model.markRelatedNotificationsRead);
        return"function"===typeof d?d.apply(null,b):void 0
        }
    });
this.$(".list-card-wrapper").parent();
null!=g&&Controller.saveCardLocation(this.model,c)
};

c.prototype.doClicks=function(){
    return!DragSort.sorting
    };
return c
}(E);
Vd=function(d){
    function c(){
        this.openSharePopover=i(this.openSharePopover,this);
        this.unsubscribe=i(this.unsubscribe,this);
        this.subscribe=i(this.subscribe,this);
        this.unvote=i(this.unvote,this);
        this.vote=i(this.vote,this);
        this.dueDateSidebar=i(this.dueDateSidebar,this);
        this.dueDateBadge=i(this.dueDateBadge,this);
        this.addChecklistMenu=i(this.addChecklistMenu,this);
        this.openAutoMentioner=i(this.openAutoMentioner,this);
        this.keyAutoMention=i(this.keyAutoMention,this);
        this.checkInsertMember=
        i(this.checkInsertMember,this);
        this.inputComment=i(this.inputComment,this);
        this.changeMembers=i(this.changeMembers,this);
        this.clearComment=i(this.clearComment,this);
        this.submitComment=i(this.submitComment,this);
        this.startUpload=i(this.startUpload,this);
        this.renderAttachments=i(this.renderAttachments,this);
        this.renderChecklists=i(this.renderChecklists,this);
        this.renderSubscribe=i(this.renderSubscribe,this);
        this.renderVotes=i(this.renderVotes,this);
        this.renderLabels=i(this.renderLabels,this);
        this.renderBadges=
        i(this.renderBadges,this);
        this.renderMemberList=i(this.renderMemberList,this);
        this.renderActionList=i(this.renderActionList,this);
        this.renderOpen=i(this.renderOpen,this);
        this.renderList=i(this.renderList,this);
        this.renderCardAttrs=i(this.renderCardAttrs,this);
        this.doClicks=i(this.doClicks,this);
        this.showVotes=i(this.showVotes,this);
        this.editLabels=i(this.editLabels,this);
        this.deleteCardPopover=i(this.deleteCardPopover,this);
        this.moveCard=i(this.moveCard,this);
        this.copyCard=i(this.copyCard,this);
        this.reopenCard=
        i(this.reopenCard,this);
        this.closeCard=i(this.closeCard,this);
        this.openCardMenu=i(this.openCardMenu,this);
        this.editDesc=i(this.editDesc,this);
        this.render=i(this.render,this);
        this.getData=i(this.getData,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.initialize=function(){
        var b,c,d,g=this;
        c=this.model;
        c.bind("change",this.renderCardAttrs).bind("change:closed",this.renderOpen).bind("change:labels",this.renderLabels).bind("change:idList",this.renderList);
        c.getBoard().bind("change:labelNames",
            this.renderLabels);
        d=_.debounce(this.renderActionList,1);
        b=function(){
            return Models.Action.bind("add:"+g.model.id,d).bind("remove:"+g.model.id,d)
            };
            
        this.model.bind("change:id",b);
        this.model.bind("change:idMembersVoted",this.renderVotes);
        this.model.bind("change:badges",this.renderVotes);
        this.model.bind("change:subscribed",this.renderSubscribe);
        b();
        c.memberVotedList.onAddRemove(this.renderVotes);
        c.memberList.onAddRemove(this.renderMemberList);
        c.badgeList.bind("refresh",this.renderBadges);
        c.checklistList.onAddRemove(this.renderChecklists);
        c.attachmentList.onAddRemove(this.renderAttachments);
        c.getBoard().bind("change:prefs",this.render);
        this.getData()
        };
        
    c.prototype.events={
        "keypress .new-comment-input":"submitComment",
        "click .js-card-menu":"openCardMenu",
        "click .js-close-card":"closeCard",
        "click .js-reopen-card":"reopenCard",
        "click .js-copy-card":"copyCard",
        "click .js-move-card":"moveCard",
        "click .js-edit-labels":"editLabels",
        "click .js-change-card-members":"changeMembers",
        "click .js-add-comment":"submitComment",
        "click .js-cancel-comment":"clearComment",
        "click .new-comment":"inputComment",
        "focus .new-comment-input":"inputComment",
        "click .js-open-mention-selector":"openAutoMentioner",
        "keyup .new-comment-input":"keyAutoMention",
        "keydown .new-comment-input":"checkInsertMember",
        "click .js-edit-desc":"editDesc",
        "click .js-add-checklist-menu":"addChecklistMenu",
        "click .js-add-due-date":"dueDateSidebar",
        "click .js-vote":"vote",
        "click .js-unvote":"unvote",
        "click .js-subscribe":"subscribe",
        "click .js-unsubscribe":"unsubscribe",
        "click .js-show-votes":"showVotes",
        "change .js-attach-file":"startUpload",
        "click .js-change-due-date":"dueDateBadge",
        "click .js-delete-card-popover":"deleteCardPopover",
        "click .js-share":"openSharePopover"
    };
    
    c.prototype.getData=function(){
        var b,c=this;
        b=this.model;
        this.loading=!0;
        Models.loadCardActions(b.get("idBoard"),b.id,function(){
            c.loading=!1;
            $(".js-loading-card-actions").hide()
            })
        };
        
    c.prototype.render=function(){
        var b,c,d,g;
        g=this;
        c=g.model;
        d=c.toJSON();
        b=_.map(_.filter(g.options.members,function(b){
            return _.detect(g.options.CardMembers,
                function(c){
                    return c.get("idMember")===b.id
                    })
            }),function(b){
            return b.toJSON()
            });
        d.active_members=b;
        d.canComment=this.model.getBoard().canComment(z.me());
        d.canVote=this.model.getBoard().canVote(z.me());
        d.canSubscribe=z.isLoggedIn();
        d.showActions=d.canVote||d.canSubscribe;
        $(this.el).html(t.fill("card_detail",_.extend({
            loading:this.loading
            },d),{
            editable:this.model.editable()
            }));
        c.refreshChecklists();
        this.commentInput=$(this.el).find(".new-comment-input")[0];
        g.renderCardAttrs().renderList().renderActionList().renderMemberList().renderOpen().renderChecklists().renderVotes().renderSubscribe().renderBadges().renderAttachments().renderLabels();
        this.recallDrafts();
        return this
        };
        
    c.prototype.editDesc=function(b){
        n("Card Detail","Edit Description");
        m.stop(b);
        this.edit("desc")
        };
        
    c.prototype.openCardMenu=function(b){
        m.stop(b);
        n("Card Menu","Open Card Menu","On Card Detail");
        v.toggle({
            elem:b.target,
            top:30,
            view:this.model.getView(sc)
            })
        };
        
    c.prototype.closeCard=function(){
        var b;
        $(this.model.view.el).remove();
        n("Card Detail Sidebar","Archive");
        b=$(this.model.view.el).next(".list-card:visible");
        O.selectCard(b);
        O.cardToSelect=b;
        this.model.close()
        };
        
    c.prototype.reopenCard=
    function(){
        n("Card Detail Sidebar","Re-Open");
        this.model.reopen()
        };
        
    c.prototype.copyCard=function(b){
        n("Card Detail Sidebar","Open Card Copy Menu");
        v.toggle({
            elem:$(b.target).closest(".button-link")[0],
            top:35,
            view:this.model.getView(qb)
            })
        };
        
    c.prototype.moveCard=function(b){
        m.stop(b);
        n("Card Detail Sidebar","Move");
        v.toggle({
            elem:$(b.target).closest(".button-link")[0],
            top:35,
            view:this.model.getView(tc)
            })
        };
        
    c.prototype.deleteCardPopover=function(b){
        m.stop(b);
        n("Card Detail Sidebar","Delete","Open Confirm Delete");
        v.toggle({
            elem:$(b.target).closest(".js-delete-card-popover")[0],
            top:35,
            view:this.model.getView(Wd)
            })
        };
        
    c.prototype.editLabels=function(b){
        m.stop(b);
        n("Card Detail Sidebar","Labels","Open From Sidebar");
        v.toggle({
            elem:$(b.target).closest(".button-link")[0],
            top:35,
            view:this.model.getView(Db)
            })
        };
        
    c.prototype.showVotes=function(b){
        var c=this;
        m.stop(b);
        this.model.getVoterDisplayData(function(){
            n("Card Detail Badges","Vote","Show Voters");
            return v.toggle({
                elem:$(b.target).closest(".js-show-votes")[0],
                top:30,
                view:c.model.getView(qd)
                })
            })
        };
        
    c.prototype.doClicks=function(){
        return!DragSort.sorting
        };
        
    c.prototype.renderCardAttrs=function(){
        var b,c;
        b=this.model;
        c=b.get("name");
        b=b.get("desc");
        $(this.el).find(".window-title-text").text(c);
        $(this.el).find(".card-detail-desc>div.current").html(ga.markdownAsHtml(null!=b?b:""));
        c=!/^\s*$/.test($(this.el).find(".card-detail-desc>div.current").text());
        $(this.el).find(".card-detail-desc>div.current").toggle(c);
        return this
        };
        
    c.prototype.renderList=function(){
        $(this.el).find(".js-current-list").html(t.fill("card_detail_list",

        {
            listName:this.model.getList().get("name")
            }));
        return this
        };
        
    c.prototype.renderOpen=function(){
        var b;
        b=!0===this.model.get("closed");
        $(this.el).find(".js-close-card").toggleClass("hide",b);
        $(this.el).find(".js-reopen-card").toggleClass("hide",!b);
        return this
        };
        
    c.prototype.renderActionList=function(){
        var b,c,d;
        c=$(this.el).find(".list-actions");
        d=this.model.getBoard().id;
        b=_.filter(Models.Action.getListForModel(this.model),function(b){
            var c,e;
            return(null!=(c=b.get("data").board)?c.id:void 0)===d||"commentCard"===
            (e=b.get("type"))||"copyCommentCard"===e
            });
        (new Da(b)).renderTo(c,{
            compact:!1,
            key:this.model.id,
            model:this.model
            });
        return this
        };
        
    c.prototype.renderMemberList=function(){
        var b,c,d;
        d=this.model;
        b=$(this.el).find(".card-detail-members");
        c=$(this.el).find(".no-mems");
        b.find(".member").not(".js-change-card-members").remove();
        b.toggleClass("hide",0===d.memberList.length);
        c.toggleClass("hide",0!==d.memberList.length);
        d.memberList.forEach(function(c){
            c=c.getView(jc,"carddetail_"+d.cid,{
                parent:d
            });
            return b.append(c.render().el)
            });
        return this
        };
        
    c.prototype.renderBadges=function(){
        var b,c,d=this;
        c=this.model;
        b=$(this.el).find(".badges");
        b.empty();
        c.badgeList.forEach(function(c){
            var e;
            c.get("hasVotes")?(c=d.model.toJSON(),c.voted=d.model.voted(),c.nVotes=null!=(e=d.model.get("badges"))?e.votes:void 0,c.hasVotes=c.nVotes,c.singleVote=1===c.nVotes,c.justYourVote=1===c.nVotes&&c.voted,c.canVote=d.model.getBoard().canVote(z.me()),b.append(t.fill("votes",c,{
                editable:d.model.editable()
                }))):c.get("hasDueDate")?(e=c.toJSON(),b.append(t.fill("card_detail_date",
                e,{
                    editable:d.model.editable()
                    }))):(e=c.getView(Qa,"carddetail"),b.append(e.render().el))
            });
        return this
        };
        
    c.prototype.renderLabels=function(){
        var b,c,d,g,h;
        b=_.filter(this.model.getLabels(),function(b){
            return b.isActive
            });
        c=$(this.el).find(".card-label-list").find(".card-labels");
        c.empty();
        0===b.length&&c.append("<p class='empty'>No labels</p>");
        for(g=0,h=b.length;g<h;g++)d=b[g],c.append(t.fill("label",d));
        return this
        };
        
    c.prototype.renderVotes=function(){
        var b,c;
        b=$(this.el).find(".js-vote-sidebar-button");
        c=this.model.toJSON();
        c.voted=this.model.voted();
        c.canVote=this.model.getBoard().canVote(z.me());
        b.html(t.fill("card_detail_vote_btn_sidebar",c));
        return this
        };
        
    c.prototype.renderSubscribe=function(){
        var b,c;
        b=$(this.el).find(".js-subscribe-sidebar-button");
        c=this.model.toJSON();
        c.subscribed=this.model.get("subscribed");
        b.html(t.fill("card_detail_subscribe",c));
        return this
        };
        
    c.prototype.renderChecklists=function(){
        var b,c;
        c=this.model;
        b=$(this.el).find(".checklists.window-module");
        b.empty();
        c.checklistList.forEach(function(d){
            d=
            d.getView(uc,c.cid,{
                card:c
            });
            b.append(d.render().el)
            });
        return this
        };
        
    c.prototype.renderAttachments=function(){
        var b,c,d;
        d=this.model;
        $(this.el).find(".attachments .uploader");
        c=$(this.el).find(".attachments .attachment-list");
        b=$(this.el).find(".attachments .no-attachments");
        c.empty().toggleClass("hide",0===d.attachmentList.length);
        b.toggleClass("hide",0!==d.attachmentList.length);
        d.attachmentList.forEach(function(b){
            b=b.getView($d,"card",{
                card:d
            });
            c.append(b.render().el)
            });
        return this
        };
        
    c.prototype.startUpload=
    function(b){
        var c,d,g,h;
        h=_.uniqueId("iframe");
        g=$(b.target);
        c=$(this.el).find(".js-file-too-large").hide();
        d=$("<iframe>").attr("name",h).css("display","none").appendTo("body").load(function(){
            $("body.error",d.contents()).text()&&c.show();
            return setTimeout(function(){
                return d.remove()
                },1E3)
            });
        g.closest("form").attr("target",h).find("input[name=token]").val(z.myToken()).end().submit();
        n("Card Detail Sidebar","Attachment","Upload Complete");
        setTimeout(function(){
            return g.val("")
            },100)
        };
        
    c.prototype.submitComment=
    function(b){
        var c,d,g;
        d=this.model;
        if(!("keypress"===b.type&&(!((c=b.keyCode)===ba||c===Ub)||!b.ctrlKey)))return n("Card Detail","Comment","Submit Comment"),m.stopPropagation(b),c=$(this.commentInput),g=$.trim(c.val()),c.val(""),d.addComment(g),R.cancelEdits(),"keypress"===b.type&&c[0].focus(),!1
            };
            
    c.prototype.clearComment=function(b){
        this.stopEditing();
        m.stop(b);
        $(this.commentInput).val("").focus().blur();
        return $(".new-comment").removeClass("focus")
        };
        
    c.prototype.changeMembers=function(b){
        m.stop(b);
        n("Card Detail Sidebar","Members","Open Manage Member Menu");
        b=$(this.el).find(".js-change-card-members");
        v.toggle({
            elem:b[0],
            top:35,
            view:this.model.getView(Eb)
            })
        };
        
    c.prototype.inputComment=function(b){
        m.stopPropagation(b);
        b=$(this.el).find(".new-comment");
        R.cancelEdits(this.commentInput);
        b.addClass("focus")
        };
        
    c.prototype.checkInsertMember=function(b){
        var c,d,g,h;
        if(v.isVisible()&&0<$(".pop-over").find(".js-available-members").length&&!Browser.isTouch()&&!(b.shiftKey&&((c=b.keyCode)===Y||c===X)||b.altKey&&
            ((d=b.keyCode)===Y||d===X))){
            if((g=b.keyCode)===va||g===ba)return m.stop(b),$(".pop-over").find(".js-available-members").find(".item.selected:first .js-select-member").first().click(),v.hide(),!1;
            if((h=b.keyCode)===Y||h===X)return c=$(".js-available-members"),m.navMenuList(c,".item",b.keyCode),!1
                }
            };
    
c.prototype.keyAutoMention=function(b){
    var c,d,g;
    if(!Browser.isTouch())if(d=m.getWordFromCaret(this.commentInput),c=/^@\S/,c.test(d.str.substring(0,2))){
        if(!((g=b.keyCode)===pa||g===na||g===ka||g===Y||
            g===X))if(b=this.model.getView(vc,"input",{
            input:!0
            }),v.load(b),0!==b.idMatchMems.length)return v.show({
            elem:$(".js-open-mention-selector")[0],
            top:35,
            view:b,
            preloaded:!0
            }),$(this.commentInput).focus()
            }else return _.delay(function(){
        return v.hide()
        },5)
    };
    
c.prototype.openAutoMentioner=function(b){
    m.stop(b);
    n("Card Detail","Mention Autocomplete","Open Menu - With Click");
    v.toggle({
        elem:$(b.target).closest(".js-open-mention-selector")[0],
        top:35,
        view:this.model.getView(vc,"button",{
            button:!0
            })
        })
    };
    
c.prototype.addChecklistMenu=
function(b){
    m.preventDefault(b);
    n("Card Detail Sidebar","Checklist","Open Add Checklist Menu");
    v.toggle({
        elem:b.target,
        top:35,
        view:this.model.getView(ae)
        });
    return!1
    };
    
c.prototype.dueDateBadge=function(b){
    m.preventDefault(b);
    n("Card Detail Badges","Due Date","Open Due Date Menu");
    v.toggle({
        elem:$(b.target).closest(".due-date-badge")[0],
        top:28,
        view:this.model.getView($a)
        });
    return!1
    };
    
c.prototype.dueDateSidebar=function(b){
    m.preventDefault(b);
    n("Card Detail Sidebar","Due Date","Open Due Date Menu");
    v.toggle({
        elem:$(b.target).closest(".button-link")[0],
        top:35,
        view:this.model.getView($a)
        });
    return!1
    };
    
c.prototype.vote=function(b){
    m.preventDefault(b);
    n("Card Detail Sidebar","Vote","Vote");
    this.model.vote(!0);
    return!1
    };
    
c.prototype.unvote=function(b){
    m.preventDefault(b);
    n("Card Detail Sidebar","Vote","Unvote");
    this.model.vote(!1);
    return!1
    };
    
c.prototype.subscribe=function(){
    n("Card Detail Sidebar","Subscribe","Subscribe");
    return this.model.subscribe(!0)
    };
    
c.prototype.unsubscribe=function(){
    n("Card Detail Sidebar","Subscribe","Unsubscribe");
    return this.model.subscribe(!1)
    };
c.prototype.openSharePopover=function(b){
    m.stop(b);
    n("Card Detail Sidebar","Share, Print, and Export","Open Share Popover");
    v.toggle({
        elem:$(b.target).closest(".js-share")[0],
        top:35,
        view:this.model.getView(oc)
        })
    };
    
return c
}(N);
Wd=function(d){
    function c(){
        this.cancel=i(this.cancel,this);
        this.deleteCard=i(this.deleteCard,this);
        this.render=i(this.render,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.getViewTitle=function(){
        return"Delete Card?"
        };
        
    c.prototype.events={
        "click .js-delete-card":"deleteCard",
        "click .js-cancel":"cancel"
    };
    
    c.prototype.render=function(){
        $(this.el).html(t.fill("popover_confirm_delete_card"));
        return this
        };
        
    c.prototype.deleteCard=function(){
        v.hide();
        F.hide();
        this.model.destroy();
        n("Card","Delete Menu","Successfully Deleted")
        };
        
    c.prototype.cancel=function(b){
        m.stop(b);
        n("Card","Delete Menu","Cancel");
        v.hide()
        };
        
    return c
    }(E);
Eb=function(d){
    function c(){
        this.selectMem=i(this.selectMem,this);
        this.keyupEvent=i(this.keyupEvent,this);
        this.hoverMemberSelect=i(this.hoverMemberSelect,this);
        this.fillMems=i(this.fillMems,this);
        this.filterMembers=i(this.filterMembers,this);
        this.render=i(this.render,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.getViewTitle=function(){
        return"Members"
        };
        
    c.prototype.events={
        "click .js-select-member":"selectMem",
        "hover .pop-over-member-list .item":"hoverMemberSelect",
        keyup:"keyupEvent",
        keydown:"keydownEvent"
    };
    
    c.prototype.render=function(){
        $(this.el).html(t.fill("popover_select_members",{},{},{
            select_member:t.select_member
            }));
        this.memListEl=$(this.el).find(".js-mem-list");
        this.allMembers=_.sortBy(this.model.getBoard().memberList.models,function(b){
            return b.get("fullName")
            });
        this.fillMems(this.allMembers);
        return this
        };
        
    c.prototype.filterMembers=function(b){
        var c,d,g,h,j,i;
        if(""===b)return this.allMembers;
        g=RegExp("^"+b);
        c=[];
        i=this.allMembers;
        for(h=0,j=i.length;h<j;h++)b=i[h],d=m.getMemNameArray(b.id),_.detect(d,function(b){
            return g.test(b)
            })&&c.push(b);
        return c.slice(0,8)
        };
        
    c.prototype.fillMems=function(b){
        var c,d,g=this;
        d=this.model;
        this.memListEl.empty();
        this.memListEl.toggleClass("collapsed",9<b.length);
        0===b.length?this.memListEl.append("<p class='empty'>No results</p>"):(c=_.pluck(d.memberList.models,"id"),b.forEach(function(b){
            var d;
            d=b.toJSON();
            _.include(c,b.id)&&(d.isActive=!0);
            return g.memListEl.append(t.fill("select_member",d,{},{
                member:t.member
                }))
            }))
        };
        
    c.prototype.hoverMemberSelect=function(b){
        b=$(b.target).closest(".item");
        return m.selectMenuItem(this.memListEl,".item",b)
        };
        
    c.prototype.keydownEvent=function(b){
        var c;
        if((c=b.keyCode)===va||c===ba)m.stop(b),$(this.el).find(".js-mem-list .item.selected:first .js-select-member").first().click(),$(".js-search-mem").val("").focus(),this.fillMems(this.allMembers)
            };
            
    c.prototype.keyupEvent=function(b){
        var c,d;
        if(!((c=b.keyCode)===va||c===ba||c===pa||c===ka||c===na||c===Sb||c===oa)){
            if((d=b.keyCode)===Y||d===X)return m.navMenuList(this.memListEl,".item",b.keyCode);
            b=$(".js-search-mem").val().trim();
            b=this.filterMembers(b);
            this.fillMems(b);
            this.focusSearch();
            if(b.length<
                this.allMembers.length)return b=this.memListEl.find(".item").first(),m.selectMenuItem(this.memListEl,".item",b)
                }
            };
    
c.prototype.selectMem=function(b){
    var c,d;
    m.preventDefault(b);
    d=this.model;
    c=$(b.target).closest(".js-select-member");
    b=c.closest(".item");
    c=c.attr("idMember");
    b.hasClass("active")?(d.removeMember(c),b.removeClass("active")):(d.addMember(c),b.addClass("active"));
    this.focusSearch();
    S.refreshFilters();
    return!1
    };
    
c.prototype.focusSearch=function(){
    return $(".js-search-mem").focus()
    };
    
return c
}(E);
sc=function(d){
    function c(){
        this.close=i(this.close,this);
        this.changeDueDate=i(this.changeDueDate,this);
        this.editLabels=i(this.editLabels,this);
        this.copyCard=i(this.copyCard,this);
        this.moveCard=i(this.moveCard,this);
        this.changeMembers=i(this.changeMembers,this);
        this.vote=i(this.vote,this);
        this.toggleSubscribe=i(this.toggleSubscribe,this);
        this.doClicks=i(this.doClicks,this);
        this.render=i(this.render,this);
        this.initialize=i(this.initialize,this);
        return c.__super__.constructor.apply(this,arguments)
        }
    u(c,d);
    c.prototype.getViewTitle=function(){
        return"Card Actions"
        };
        
    c.prototype.initialize=function(){
        return this.model.bind("change:subscribed",this.render)
        };
        
    c.prototype.events={
        "click .js-change-card-members":"changeMembers",
        "click .js-edit-labels":"editLabels",
        "click .js-due-date":"changeDueDate",
        "click .js-subscribe":"toggleSubscribe",
        "click .js-vote":"vote",
        "click .js-move-card":"moveCard",
        "click .js-copy-card":"copyCard",
        "click .js-close-card":"close"
    };
    
    c.prototype.render=function(){
        var b;
        b={};
        z.me();
        b.hasVoted=this.model.voted();
        b.canVote=this.model.getBoard().canVote(z.me());
        b.isSubscribed=this.model.get("subscribed");
        $(this.el).html(t.fill("popover_card_menu",b));
        return this
        };
        
    c.prototype.doClicks=function(){
        return!DragSort.sorting
        };
        
    c.prototype.toggleSubscribe=function(b){
        m.preventDefault(b);
        this.model.get("subscribed")?(n("Card Menu","Subscribe","Subscribe"),this.model.subscribe(!1)):(n("Card Menu","Subscribe","Unsubscribe"),this.model.subscribe(!0))
        };
        
    c.prototype.vote=function(b){
        m.preventDefault(b);
        n("Card Menu","Vote");
        this.model.toggleVote();
        this.render();
        return!1
        };
        
    c.prototype.changeMembers=function(b){
        var c;
        c=this.model;
        n("Card Menu","Open Change Members Menu");
        m.preventDefault(b);
        if(!this.doClicks())return!1;
        m.stopPropagation(b);
        v.pushView({
            view:c.getView(Eb)
            })
        };
        
    c.prototype.moveCard=function(b){
        m.stop(b);
        n("Card Menu","Open Move Card Menu");
        v.pushView({
            view:this.model.getView(tc)
            })
        };
        
    c.prototype.copyCard=function(){
        n("Card Menu","Open Card Copy Menu");
        v.pushView({
            view:this.model.getView(qb)
            })
        };
    c.prototype.editLabels=function(b){
        m.stop(b);
        n("Card Menu","Open Edit Labels Menu");
        v.pushView({
            view:this.model.getView(Db)
            })
        };
        
    c.prototype.changeDueDate=function(b){
        m.stop(b);
        n("Card Menu","Open Due Date Menu");
        v.pushView({
            view:this.model.getView($a)
            })
        };
        
    c.prototype.close=function(){
        var b,c;
        b=this.model;
        n("Card Menu","Archive Card");
        b.getBoard();
        c=$(b.view.el).next(".list-card:visible");
        O.selectCard(c);
        O.cardToSelect=c;
        $(b.view.el).remove();
        b.close();
        v.hide()
        };
        
    return c
    }(N);
qb=function(d){
    function c(){
        this.submit=
        i(this.submit,this);
        this.keydownEvent=i(this.keydownEvent,this);
        this.render=i(this.render,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.getViewTitle=function(){
        return"Copy Card"
        };
        
    c.prototype.events={
        "click .js-submit":"submit",
        "submit form":"submit",
        "keydown textarea[name='name']":"keydownEvent"
    };
    
    c.prototype.render=function(){
        var b;
        b=this.model.toJSON();
        b.numChecklists=b.idChecklists.length;
        b.numMembers=b.idMembers.length;
        b.numLabels=b.labels.length;
        b.numAttachments=
        b.badges.attachments;
        b.numComments=b.badges.comments;
        $(this.el).html(t.fill("card_copy",b,{
            editable:this.model.editable()
            }));
        return this
        };
        
    c.prototype.keydownEvent=function(b){
        b.keyCode===ba&&(m.stop(b),this.submit(b))
        };
        
    c.prototype.submit=function(b){
        var c,d;
        m.stop(b);
        d=$(this.el).find('textarea[name="name"]');
        ""===d.val().trim()?d.focus().select():(boardView.cardComposerState.vis?(c=boardView.cardComposerState,b=boardView.model.getView(da).getListModel(c.pos),c=b.calcPos(c.pos.cardPos)):(b=this.model.getList(),
            c=b.calcPos(this.model.getIndexInList()+1,this.model,!0)),b={
            idCardSource:this.model.get("id"),
            idList:b.id,
            idBoard:this.model.get("idBoard"),
            pos:c,
            name:d.val().trim(),
            closed:!1,
            keepFromSource:$(this.el).find("input:checkbox[checked]").map(function(){
                return this.name
                }).get().join()
            },ua({
            url:"/1/cards",
            type:"post",
            data:b,
            success:function(){
                v.hide();
                return boardView.model.getView(da).hide()
                }
            }))
    };
    
return c
}(N);
tc=function(d){
    function c(){
        this.cancelChange=i(this.cancelChange,this);
        this.commitChange=i(this.commitChange,
            this);
        this.updatePositionList=i(this.updatePositionList,this);
        this.updateListList=i(this.updateListList,this);
        this.updateBoardData=i(this.updateBoardData,this);
        this.renderValues=i(this.renderValues,this);
        this.render=i(this.render,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.getViewTitle=function(){
        return"Move Card"
        };
        
    c.prototype.events={
        "change .js-select-position":"renderValues",
        "change .js-select-list":"updatePositionList",
        "change .js-select-board":"updateBoardData",
        "click .js-commit-position":"commitChange",
        "click .js-cancel-position":"cancelChange"
    };
    
    c.prototype.render=function(){
        var b,c;
        c=this.model;
        b={
            boards:[]
        };
        
        z.me().boardList.each(function(d){
            var g;
            if(!d.get("closed"))return g=d.toJSON(),d.id===c.get("idBoard")&&(g.selected=!0),b.boards.push(g)
                });
        b.boards=_.sortBy(b.boards,function(b){
            return b.name
            });
        $(this.el).html(t.fill("popover_move_card",b));
        this.updateBoardData();
        return this
        };
        
    c.prototype.renderValues=function(){
        var b,c,d,g,h;
        b=$(this.el);
        d=b.find(".js-select-board option:selected").val();
        g=b.find(".js-select-list option:selected").val();
        h=parseInt(b.find(".js-select-position option:selected").val(),10)+1;
        c=Models.Board.get(d);
        d=c.get("name");
        c=_.find(c.listList.models,function(b){
            return b.id===g
            }).get("name");
        h=m.getNaturalNumber(""+h);
        b.find(".js-board-value").text(d);
        b.find(".js-list-value").text(c);
        b.find(".js-pos-value").text(h)
        };
        
    c.prototype.updateBoardData=function(){
        var b,c,d,g,h,j,i=this;
        b=$(this.el);
        d=b.find(".js-select-board").find("option:selected").val();
        if(d===this.model.getBoard().id){
            this._boardData=
            this.model.getBoard();
            j=this._boardData.listList.models;
            for(g=0,h=j.length;g<h;g++)b=j[g],b.cardCount=this._boardData.listList.get(b.id).cardList.filter(function(b){
                return!b.get("closed")
                }).length;
            return this.updateListList()
            }
            c=b.find(".select-list,.select-position");
        c.attr("disabled","disabled");
        return Models.loadBoardListData(d,{
            lists:"open",
            list_fields:"name,pos,idBoard",
            cards:"visible",
            card_fields:"idList"
        },function(){
            i._boardData=Models.Board.get(d);
            i.updateListList();
            return c.removeAttr("disabled")
            })
        };
    c.prototype.updateListList=function(){
        var b,c,d,g,h,j,i,o;
        b=$(this.el);
        d=b.find(".js-select-board");
        b=b.find(".js-select-list");
        g=d.find("option:selected").val();
        b.empty();
        d=this.model.getList().id;
        g=g===this.model.getBoard().id?d:this._boardData.listList.models[0].id;
        o=_.sortBy(this._boardData.listList.models,function(b){
            return b.get("pos")
            });
        for(j=0,i=o.length;j<i;j++)h=o[j],h.get("closed")||(c=h.get("name"),h.id===d&&(c+=" (current)"),c=$("<option>").val(h.id).text(c).appendTo(b),h.id===g&&c.attr("selected",
            "selected"));
        return this.updatePositionList()
        };
        
    c.prototype.updatePositionList=function(){
        var b,c,d,g,h,j,i,o,q,n;
        h=this.model;
        b=$(this.el);
        d=b.find(".js-select-list");
        g=b.find(".js-select-position");
        j=d.find("option:selected").val();
        g.empty();
        d=null!=(i=_.detect(this._boardData.listList.models,function(b){
            return b.id===j
            }))?i:this._boardData.listList.models[0];
        d=(null!=d?d.id:void 0)===this.model.getList().id;
        i=this._boardData.listList.get(j).cardList.length;
        d?(q=h=_.indexOf(h.getList().cardList.filter(function(b){
            return!b.get("closed")
            }),
        h),i-=1):(h=-1,q=i);
        for(d=n=0;0<=i?n<=i:n>=i;d=0<=i?++n:--n)c=o=""+(d+1),d===h?c+=" (current)":0<i&&(0===d?c+=" (top)":d===i&&(c+=" (bottom)")),c=$("<option>").val(d).text(c).appendTo(g),d===q&&(b.find(".js-pos-value").html(m.getNaturalNumber(o)),c.attr("selected","selected"));
        this.renderValues()
        };
        
    c.prototype.commitChange=function(){
        var b,c,d,g;
        g=this.model;
        b=$(this.el);
        c=b.find(".js-select-board");
        d=b.find(".js-select-list");
        b=b.find(".js-select-position");
        c=c.find("option:selected").val();
        d=d.find("option:selected").val();
        b=parseInt(b.find("option:selected").val(),10);
        c===g.getBoard().id?(d=g.getBoard().listList.get(d),g.moveToList(d,b),n("Card","Move Menu","Same Board")):null!=c&&null!=d&&null!=b&&(n("Card","Move Menu","Changed Board"),g.getList().cardList.remove(g),F.hide(),g.api.moveToBoard({
            idBoard:c,
            idList:d,
            index:b
        },function(b){
            g.board=null;
            g.set("idBoard",b.idBoard);
            return g.set("idList",b.idList)
            }));
        v.hide()
        };
        
    c.prototype.cancelChange=function(){
        return v.hide()
        };
        
    return c
    }(N);
Db=function(d){
    function c(){
        this.toggleColorBlindMode=
        i(this.toggleColorBlindMode,this);
        this.openEditLabelTitles=i(this.openEditLabelTitles,this);
        this.toggleLabel=i(this.toggleLabel,this);
        this.render=i(this.render,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.getViewTitle=function(){
        return"Change Labels"
        };
        
    c.prototype.initialize=function(){
        return z.me().bind("change:prefs",this.render)
        };
        
    c.prototype.events={
        "click .card-label":"toggleLabel",
        "click .js-edit-label-titles":"openEditLabelTitles",
        "click .js-toggle-color-blind-mode":"toggleColorBlindMode"
    };
    c.prototype.render=function(){
        var b,c;
        b={
            labels:this.model.getLabels(),
            showShortcuts:this.options.showShortcuts
            };
            
        c={
            editable:this.model.editable()
            };
            
        b.cbModeEnabled=z.me().get("prefs").colorBlind;
        b.cbToggleText="Enable";
        b.cbModeEnabled&&(b.cbToggleText="Disable");
        $(this.el).html(t.fill("popover_change_labels",b,c));
        return this
        };
        
    c.prototype.toggleLabel=function(b){
        var c,b=$(b.target).closest(".card-label");
        if(c=b.attr("label"))n("Card","Labels Menu","Change Label"),this.model.toggleLabel(c),this.options.hideOnSelect?
            v.hide():(c=b.hasClass("active"),b.toggleClass("active",!c))
            };
            
    c.prototype.openEditLabelTitles=function(b){
        m.stop(b);
        n("Card","Labels Menu","Open Edit Label Titles");
        v.pushView({
            view:this.model.board.getView(rc)
            })
        };
        
    c.prototype.toggleColorBlindMode=function(){
        z.me().toggleColorBlindMode()
        };
        
    return c
    }(N)
}
if(C("action")){
    var Ra,Da,qc,be,ce,i=function(d,c){
        return function(){
            return d.apply(c,arguments)
            }
        },D={}.hasOwnProperty,u=function(d,c){
    function b(){
        this.constructor=d
        }
        for(var e in c)D.call(c,e)&&(d[e]=
        c[e]);b.prototype=c.prototype;
    d.prototype=new b;
    d.__super__=c.prototype;
    return d
    };
    
Ra=function(d){
    function c(){
        this.takingTooLong=i(this.takingTooLong,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.initialize=function(){
        return this.date=new Date(this.get("date"))
        };
        
    c.prototype.getModel=function(){
        return this.collection.options.model
        };
        
    c.prototype.isMember=function(b){
        return this.get("idMemberCreator")===b.id
        };
        
    c.prototype.getBoard=function(){
        var b,c,d;
        return(b=null!=(c=
            this.get("data"))?null!=(d=c.board)?d.id:void 0:void 0)?Models.Board.get(b):null
        };
        
    c.prototype.getCard=function(){
        var b,c,d;
        return(b=null!=(c=this.get("data"))?null!=(d=c.card)?d.id:void 0:void 0)?Models.Card.get(b):null
        };
        
    c.prototype.editable=function(){
        var b,c;
        c=this.get("idMemberCreator");
        return"commentCard"===this.get("type")&&(z.isMe(c)||(b=this.getBoard())&&0<b.compareMemberType(z.me(),this.get("idMemberCreator"),{
            mode:"members"
        }))
        };
        
    c.prototype.isPlaceholder=function(){
        return null==this.get("date")
        };
    c.prototype.includesModel=function(b,c){
        var d,g;
        return(null!=(d=this.get("data"))?null!=(g=d[b])?g.id:void 0:void 0)===c||"member"===b&&this.get("idMemberCreator")===c
        };
        
    c.prototype.idModels=function(){
        var b,c,d,g;
        g=null!=(d=this.get("data"))?d:{};
        
        d=[];
        for(b in g)c=g[b],null!=c.id&&d.push(c.id);b=this.get("idMemberCreator");
        null!=b&&d.push(b);
        return d
        };
        
    c.prototype.takingTooLong=function(){
        this.isTakingTooLong=!0;
        return this.trigger("takingTooLong")
        };
        
    return c
    }(la);
qc=function(d){
    function c(){
        return c.__super__.constructor.apply(this,
            arguments)
        }
        u(c,d);
    c.prototype.getMember=function(b){
        return Models.Member.get(b)
        };
        
    c.prototype.getBoard=function(b){
        return Models.Board.get(b)
        };
        
    return c
    }(eb);
Da=function(d){
    function c(){
        this._getRelatedBoards=i(this._getRelatedBoards,this);
        this.sync=i(this.sync,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.model=Ra;
    c.prototype.initialize=function(b,c){
        this.options=c
        };
        
    c.prototype.comparator=function(b){
        return/^placeholder/.test(b.id)?(b=parseInt(b.id.substr(11)),-new Date(2020,
            1,1)-b):-U.parse(b.get("date"))||0
        };
        
    c.prototype.sync=function(b,c,d){
        return d(ModelAction.actions)
        };
        
    c.prototype.getEntityLists=function(b){
        return(new qc).getEntityLists(this.models,b)
        };
        
    c.prototype._getRelatedBoards=function(b){
        var c,d,g;
        d=function(){
            var b,d,f,i,q,m,n;
            f=this.models;
            n=[];
            for(b=0,d=f.length;b<d;b++)if(g=f[b],"moveCardToBoard"===(i=g.get("type"))||"moveCardFromBoard"===i)c=g.get("data"),n.push((null!=(q=c.boardTarget)?q.id:void 0)||(null!=(m=c.boardSource)?m.id:void 0));return n
            }.call(this);
        d=_.compact(_.uniq(d));
        d=_.reject(d,function(b){
            return null!=Models.Board.get(b)
            });
        return 0===d.length?b():Models.loadBoardNames(d,b)
        };
        
    c.prototype.renderTo=function(b,c){
        var d=this;
        return this._getRelatedBoards(function(){
            var g,h,j,i,o,q;
            c=_.extend({},{
                compact:!0
                },c);
            j=d.getEntityLists(c);
            b.empty();
            q=[];
            for(i=0,o=j.length;i<o;i++)h=j[i],g=_.detect(d.models,function(b){
                return b.id===h.db_id
                }),g=g.getView(be,h._id,{
                entityList:h.entities,
                children:h.children,
                date:h.date,
                opts:c
            }),q.push(b.append(g.render().el));
            return q
            })
        };
        
    return c
    }(wa);
be=function(d){
    function c(){
        this.confirmDeleteAction=i(this.confirmDeleteAction,this);
        this.viewMemberActionMenu=i(this.viewMemberActionMenu,this);
        this.clickComment=i(this.clickComment,this);
        this.render=i(this.render,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.className="phenom clearfix";
    c.prototype.initialize=function(b){
        this.entityList=b.entityList;
        this.date=b.date;
        this.children=b.children;
        this.opts=b.opts;
        return this.model.bind("takingTooLong",
            this.render)
        };
        
    c.prototype.destructor=function(){};
    
    c.prototype.events={
        "click .js-show-mem-menu":"viewMemberActionMenu",
        "click .action-comment":"clickComment",
        "click .js-confirm-delete-action":"confirmDeleteAction"
    };
    
    c.prototype.render=function(){
        var b,c,d,g,h,j,i,o,q,m=this;
        J("render","rendering action");
        i=this.opts;
        g={
            entities:this.entityList,
            date:this.date,
            hasChildren:!1
            };
            
        null!=this.children&&(g.hasChildren=!0,g.children=_.sortBy(this.children,function(b){
            return b._id
            }),g.hasMoreThanOneChild=1<this.children.length);
        i.showBoard&&(c=Models.Board.get(null!=(o=this.model.get("data"))?null!=(q=o.board)?q.id:void 0:void 0),null!=c&&(g.board=c.toJSON({
            prefs:!0,
            url:!0
            })));
        i.showOrganization&&(c=Models.Organization.get(null!=(b=this.model.get("data"))?null!=(j=b.organization)?j.id:void 0:void 0),null!=c&&(g.organization=c.toJSON({
            prefs:!0,
            url:!0
            })));
        this.fUsePeriod=!0;
        g.entities=g.entities.slice(1);
        d=this.getContext();
        b=function(b){
            var c,e,h,j;
            for(h=0,j=b.length;h<j;h++)if(c=b[h],c[c.type+"Type"]=!0,"comment"===c.type&&
                (e={
                    convertNewlines:!0
                    },m.fUsePeriod=!1,c.embedly&&!i.compact&&(e.embedlyUrlData=JSON.parse(c.embedly),c.hasEmbedly=!0),c.html=ga.textAsHtml(c.text,e)),"attachmentPreview"===c.type&&(m.fUsePeriod=!1),c&&(c.id||c.idContext))c.isContext=g.isContext=c.id===d.id||c.idContext===d.id
                };
                
        if(g.children){
            q=g.children;
            for(c=0,o=q.length;c<o;c++)j=q[c],b(j.entities)
                }
                b(g.entities);
        g.showAttachmentPreview=!i.compact;
        g.canDelete=!this.model.isPlaceholder()&&!i.compact&&this.model.editable();
        g.member=null!=(h=Models.Member.get(this.entityList[0].id))?
        h.toJSON():void 0;
        h={
            entity:t.entity,
            member:t.member
            };
            
        J("actions",g);
        $(this.el).html(t.fill("action",g,{},h));
        !g.hasMoreThanOneChild&&this.fUsePeriod&&(h=_.last($(this.el).find(".phenom-desc").contents()),j=$.trim(h.nodeValue),b=".",0<j.length&&(b=" "+$.trim(h.nodeValue)+"."),$(this.el).find(".phenom-desc").contents().last().remove(),$(this.el).find(".phenom-desc").append(_.escape(b)));
        U.update(this.el);
        this.model.isTakingTooLong&&$(this.el).addClass("unsent");
        return this
        };
        
    c.prototype.getContext=
    function(){
        return this.opts.model
        };
        
    c.prototype.clickComment=function(b){
        var c;
        if(!$(b.target).is("a")&&"Board"===this.getContext().typeName)return c=_.detect(this.entityList,function(b){
            return"card"===b.type
            }),this.getContext().getCard(c.id).getView(pb).showDetail(b)
            };
            
    c.prototype.viewMemberActionMenu=function(b){
        var c,d;
        m.stop(b);
        c=Models.Member.get(this.entityList[0].id);
        d=22;
        0<$(b.target).closest(".member").length&&(d=36);
        v.toggle({
            elem:$(b.target).closest(".js-show-mem-menu")[0],
            top:d,
            view:c.getView(Ua)
            })
        };
    c.prototype.confirmDeleteAction=function(b){
        m.stop(b);
        v.toggle({
            elem:b.target,
            top:23,
            view:this.model.getView(ce)
            })
        };
        
    return c
    }(E);
ce=function(d){
    function c(){
        this.cancelDelete=i(this.cancelDelete,this);
        this.deleteAction=i(this.deleteAction,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.getViewTitle=function(){
        return"Delete Comment?"
        };
        
    c.prototype.events={
        "click .js-delete-action":"deleteAction",
        "click .js-cancel-delete":"cancelDelete"
    };
    
    c.prototype.render=function(){
        $(this.el).html(t.fill("popover_confirm_action_delete",

        {},{
            editable:!0
            }));
        return this
        };
        
    c.prototype.deleteAction=function(){
        var b;
        Models.Action.remove(this.model.id);
        null!=(b=this.model.getCard())&&b.api.deleteAction(this.model.id);
        v.hide()
        };
        
    c.prototype.cancelDelete=function(b){
        m.stop(b);
        v.hide()
        };
        
    return c
    }(N)
}
if(C("notification")){
    var Zc,bc,de,ee,gc,wc,i=function(d,c){
        return function(){
            return d.apply(c,arguments)
            }
        },D={}.hasOwnProperty,u=function(d,c){
    function b(){
        this.constructor=d
        }
        for(var e in c)D.call(c,e)&&(d[e]=c[e]);b.prototype=c.prototype;
    d.prototype=
    new b;
    d.__super__=c.prototype;
    return d
    },aa=[].indexOf||function(d){
    for(var c=0,b=this.length;c<b;c++)if(c in this&&this[c]===d)return c;return-1
    };
    
bc=function(d){
    function c(){
        this.markRead=i(this.markRead,this);
        this.getExpandedData=i(this.getExpandedData,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.typeName="Notification";
    c.prototype.getModel=function(){
        return this.collection.options.model
        };
        
    c.prototype.getExpandedData=function(){
        var b,c,d,g;
        c=_.extend(this.toJSON().data,

        {
            date:this.get("date"),
            unread:this.get("unread")
            });
        c[this.get("type")]=!0;
        c.memberCreator=Models.Member.get(this.get("idMemberCreator"));
        b=null!=(d=this.get("member"))?d.id:void 0;
        null!=b&&(c.member=Models.Member.get(b));
        d=function(b){
            var d,f,g,i;
            g=_.keys(b)[0];
            d=m.capitalize(g);
            f=b[g];
            return null!=z.me().get("id"+d+"sInvited")&&(i=f.id,0<=aa.call(z.me().get("id"+d+"sInvited"),i))&&!_.any(Models.Notification.all(),function(b){
                return b.get("type")==="invitedTo"+d&&b.get("data")[g].id===f.id&&b.get("date")>
                c.date
                })
            };
            
        b=c.board;
        g=c.organization;
        0===this.get("type").indexOf("invitedTo")&&(null!=b&&(c.stillInvited=d({
            board:b
        })),null!=g&&(c.stillInvited=d({
            organization:g
        })));
        return c
        };
        
    c.prototype.markRead=function(){
        this.set({
            unread:!1
            });
        Models.Notification.trigger("change",this);
        return z.me().api.markNotificationRead({
            idNotification:this.id
            })
        };
        
    return c
    }(la);
wc=function(d){
    function c(){
        this.rejectInvitation=i(this.rejectInvitation,this);
        this.acceptInvitation=i(this.acceptInvitation,this);
        this.handleInvitation=
        i(this.handleInvitation,this);
        this.viewMemberActionMenu=i(this.viewMemberActionMenu,this);
        this.clickedNotification=i(this.clickedNotification,this);
        this.render=i(this.render,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.enablePopupMenu=!0;
    c.prototype.showStatus=!1;
    c.prototype.className="phenom clearfix";
    c.prototype.events={
        click:"clickedNotification",
        "click .js-show-mem-menu":"viewMemberActionMenu",
        "click .js-accept-invitation":"acceptInvitation",
        "click .js-reject-invitation":"rejectInvitation"
    };
    c.prototype.render=function(){
        var b,c,d,g,h,j,i;
        b=this.model.getExpandedData();
        b.entities=(new ee).getEntityList(this.model.toJSON());
        b.member=null!=(c=Models.Member.get(b.entities[0].id))?c.toJSON():void 0;
        b.entities.shift(1);
        d={
            convertNewlines:!0
            };
            
        i=b.entities;
        for(h=0,j=i.length;h<j;h++)c=i[h],null!=c.text&&(g=m.truncate(c.text,250),c.html=ga.textAsHtml(g,d)+(g.length<c.text.length?"&hellip;":""));
        J("notifications",b);
        $(this.el).html(t.fill("notification",b,{},{
            entity:t.entity,
            member:t.member
            }));
        b.unread?$(this.el).addClass("unread"):$(this.el).removeClass("unread");
        U.update(this.el);
        return this
        };
        
    c.prototype.clickedNotification=function(){
        if(this.isHeader)return n("Header","Notifications Menu","Clicked Notification");
        if(this.isNotifications)return n("Member","Notifications","Clicked Notification")
            };
            
    c.prototype.viewMemberActionMenu=function(b){
        var c,d;
        m.stop(b);
        c=Models.Member.get(this.model.get("idMemberCreator"));
        0<$(b.target).closest(".pop-over").length?v.pushView({
            view:c.getView(Ua)
            }):
        (d=22,0<$(b.target).closest(".member").length&&(d=36),v.toggle({
            elem:$(b.target).closest(".js-show-mem-menu")[0],
            top:d,
            view:c.getView(Ua)
            }))
        };
        
    c.prototype.handleInvitation=function(b,c){
        var d,g=this;
        d=this.model.get("data")[b.toLowerCase()].id;
        return z.me().api.respondToInvitation({
            accepted:c,
            idModel:d,
            modelType:b
        },function(c){
            var e;
            e={};
            
            e["id"+b+"s"]=c["id"+b+"s"];
            e["id"+b+"sInvited"]=c["id"+b+"sInvited"];
            z.me().set(e);
            z.me().save();
            g.render();
            (Controller.onBoardView(d)||Controller.onOrganizationView(d)||
                Controller.onErrorView())&&y.navigate(null,{
                forceReload:!0
                })
            })
        };
        
    c.prototype.acceptInvitation=function(){
        $(this.el).find(".js-accept-invitation").attr("disabled","disabled");
        if("invitedToBoard"===this.model.get("type")){
            this.handleInvitation("Board",!0);
            if(this.isHeader)return n("Header","Notifications Menu","Accept Board Invite");
            if(this.isNotifications)return n("Member","Notifications","Accept Board Invite")
                }else if("invitedToOrganization"===this.model.get("type")){
            this.handleInvitation("Organization",
                !0);
            if(this.isHeader)return n("Header","Notifications Menu","Accept Org Invite");
            if(this.isNotifications)return n("Member","Notifications","Accept Org Invite")
                }
            };
    
c.prototype.rejectInvitation=function(){
    if("invitedToBoard"===this.model.get("type")){
        this.handleInvitation("Board",!1);
        if(this.isHeader)return n("Header","Notifications Menu","Reject Board Invite");
        if(this.isNotifications)return n("Member","Notifications","Reject Board Invite")
            }else if("invitedToOrganization"===this.model.get("type")){
        this.handleInvitation("Organization",
            !1);
        if(this.isHeader)return n("Header","Notifications Menu","Reject Org Invite");
        if(this.isNotifications)return n("Member","Notifications","Reject Org Invite")
            }
        };

return c
}(E);
ee=function(d){
    function c(){
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.getMember=function(b){
        return Models.Member.get(b)
        };
        
    return c
    }(Ib);
de=function(d){
    function c(){
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.isHeader=!0;
    c.prototype.goToProfile=!0;
    return c
    }(wc);
gc=function(d){
    function c(){
        return c.__super__.constructor.apply(this,
            arguments)
        }
        u(c,d);
    c.prototype.isNotifications=!0;
    c.prototype.goToProfile=!1;
    return c
    }(wc);
Zc=function(d){
    function c(){
        this.viewAllNotifications=i(this.viewAllNotifications,this);
        this.render=i(this.render,this);
        this.markUnread=i(this.markUnread,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.getViewTitle=function(){
        return"Notifications"
        };
        
    c.prototype.className="header-notification-list";
    c.prototype.events={
        "click .js-view-all-notifications":"viewAllNotifications"
    };
    
    c.prototype.markUnread=
    function(){
        var b,c,d,g,h;
        d=this.menuRows;
        h=[];
        for(b in d)c=d[b],c.model.get("unread")&&h.push(null!=(g=Models.Notification.get(b))?g.markRead():void 0);return h
        };
        
    c.prototype.render=function(){
        var b,c,d,g,h,j;
        c=this.model;
        this.menuRows={};
        
        b=0;
        $(this.el).empty();
        g=Models.Notification.sortedByDateDescending();
        for(h=0,j=g.length;h<j;h++){
            d=g[h];
            if(4<b)break;
            b++;
            this.menuRows[d.id]=d.getView(de,"header");
            $(this.el).append(this.menuRows[d.id].render().el)
            }
            var i;
        j=Models.Notification.sortedByDateDescending().slice(5);
        i=[];
        for(b=0,h=j.length;b<h;b++)d=j[b],d.get("unread")&&i.push(d);
        d=i.length;
        d=0===d?"":" ("+d+" more unread)";
        0===g.length&&$(this.el).append('<p class="empty">No Notifications</p>');
        $(this.el).append(t.fill("menu",{
            menu_cards:[{
                name:"See All Notifications"+d,
                js_class:"js-view-all-notifications",
                url:"/"+c.get("username")+"/notifications"
                }]
            }));
        return this
        };
        
    c.prototype.viewAllNotifications=function(){
        return n("Header","Notifications Menu","See All Notifications")
        };
        
    return c
    }(E)
}
if(C("badge")){
    var ma,
    Zd,Qa,D={}.hasOwnProperty,u=function(d,c){
        function b(){
            this.constructor=d
            }
            for(var e in c)D.call(c,e)&&(d[e]=c[e]);b.prototype=c.prototype;
        d.prototype=new b;
        d.__super__=c.prototype;
        return d
        },i=function(d,c){
        return function(){
            return d.apply(c,arguments)
            }
        };
    
ma=function(d){
    function c(){
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.typeName="Badge";
    return c
    }(la);
Zd=function(d){
    function c(){
        this.getCard=i(this.getCard,this);
        this.update=i(this.update,this);
        return c.__super__.constructor.apply(this,
            arguments)
        }
        u(c,d);
    c.prototype.model=ma;
    c.prototype.initialize=function(b,c){
        var d;
        this.options=c;
        this.bind("change:pos",this.sort);
        d=this.getCard();
        d.bind("change:badges",this.update);
        d.memberVotedList.onAddRemove(this.update);
        d.bind("change:closed",this.update);
        d.bind("change:subscribed",this.update);
        Models.Notification.bind("add",this.update);
        Models.Notification.bind("change",this.update);
        Models.Notification.bind("remove",this.update);
        setInterval(this.update,36E5);
        this.update()
        };
        
    c.prototype.update=
    function(){
        var b,c,d,g,h,j,i,o,q,m;
        d=this.options.model;
        c=d.get("badges");
        b=[];
        null!=c&&((j=function(){
            var b,c,e,g,h;
            e=Models.Notification.all();
            h=[];
            for(b=0,c=e.length;b<c;b++)m=e[b],m.get("unread")&&(null!=(g=m.get("data").card)?g.id:void 0)===d.id&&d.id&&h.push(1);
            return h
            }().length)&&b.push(new ma({
            hasUnreadNotifications:!0,
            count:j,
            className:"unread-notification",
            titleAttr:"This card has "+j+" unread notification(s)."
            })),d.get("closed")&&b.push(new ma({
            isArchived:!0,
            titleAttr:"This card is in the archive."
        })),
        j=null!=(g=null!=(o=d.get("badges"))?o.votes:void 0)?g:0,g=d.get("badges").viewingMemberVoted||!1,0<j&&(o="votes",g&&(o="votes voted"),b.push(new ma({
            hasVotes:!0,
            className:o,
            count:""+j+" vote"+(1===j?"":"s"),
            titleAttr:"This card has "+j+" votes(s)."
            }))),c.comments&&b.push(new ma({
            hasComments:!0,
            className:"comments",
            count:c.comments,
            titleAttr:"This card has "+c.comments+" comment(s)."
            })),c.subscribed&&b.push(new ma({
            className:"image-only",
            isSubscribed:!0,
            titleAttr:"You are subscribed to this card."
        })),
        c.description&&b.push(new ma({
            hasDesc:!0,
            className:"image-only",
            titleAttr:"This card has a description."
        })),c.due&&(j=U.parse(c.due),g=new Date,i=h="",h=(j-g)/36E5,i=Math.round(10*h)/10,g=U.toLongString(j),o="light",-36>=h?(h="due-past",i="This card is past due.",q=""+g+" (past due)"):0>=h?(h="due-now",i="This card is recently past due!",q=""+g+" (recently past due!)"):24>h?(1>=i?i="This card is due in less than an hour.":1.3>=i?i="This card is due in about an hour.":(h=Math.floor(i),i-=parseInt(i,
            10),i=Math.round(10*i),i=3>i?"This card is due in "+h+" hours.":7<i?"This card is due in "+(h+1)+" hours.":"This card is due in "+h+" and a half hours."),h="due-soon",q=""+g+" (due soon)"):(i="This card is due later.",h="due-future",q=""+g,o=""),b.push(new ma({
            hasDueDate:!0,
            className:h,
            date:j,
            dueClass:h,
            dateText:g,
            longDateText:q,
            shortDueDate:j.toString("MMM d"),
            titleAttr:i,
            lightClass:o
        }))),c.attachments&&b.push(new ma({
            hasAttachments:!0,
            count:c.attachments,
            titleAttr:"This card has "+c.attachments+
            " attachment(s)."
            })),c.checkItems&&b.push(new ma({
            hasTasks:!0,
            count:c.checkItemsChecked,
            total:c.checkItems,
            hasTotal:!0,
            complete:c.checkItems===c.checkItemsChecked?"complete":"",
            titleAttr:"This card has "+c.checkItemsChecked+" of "+c.checkItems+" checklist items completed.",
            className:c.checkItems===c.checkItemsChecked?"complete":""
            })),c.fogbugz&&b.push(new ma({
            className:"image-only",
            hasFogBugzLink:!0,
            fogBugzUrl:c.fogbugz,
            titleAttr:"This card has a FogBugz case.",
            click:function(){
                return y.open(c.fogbugz,
                    "FogBugz")
                }
            })),this.refresh(b))
    };
    
c.prototype.getCard=function(){
    return this.options.model
    };
    
return c
}(wa);
Qa=function(d){
    function c(){
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.className="badge";
    c.prototype.events={
        click:"click"
    };
    
    c.prototype.initialize=function(){
        var b,c,d;
        b=this.model.get("className");
        d=this.model.get("titleAttr");
        c=this.model.get("highlight");
        d&&$(this.el).attr("title",d);
        b&&$(this.el).addClass(b);
        c&&$(this.el).addClass("highlight")
        };
        
    c.prototype.render=
    function(){
        var b;
        b=this.model.toJSON();
        b.single=1===b.count;
        $(this.el).html(t.fill("badges",b));
        return this
        };
        
    c.prototype.click=function(b){
        var c;
        if(c=this.model.get("click"))return m.stop(b),c(b,this.model)
            };
            
    return c
    }(E)
}
if(C("checklist")){
    var ae,fe,ge,he,ie,pc,je,uc,ke,i=function(d,c){
        return function(){
            return d.apply(c,arguments)
            }
        },D={}.hasOwnProperty,u=function(d,c){
    function b(){
        this.constructor=d
        }
        for(var e in c)D.call(c,e)&&(d[e]=c[e]);b.prototype=c.prototype;
    d.prototype=new b;
    d.__super__=c.prototype;
    return d
    };
    
ie=function(d){
    function c(){
        this.editable=i(this.editable,this);
        this.getCheckItem=i(this.getCheckItem,this);
        this.getCompletedCount=i(this.getCompletedCount,this);
        this.getBoard=i(this.getBoard,this);
        this.withIdParents=i(this.withIdParents,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.typeName="Checklist";
    c.prototype.initialize=function(){
        return Api.init(this)
        };
        
    c.prototype.postInitialize=function(){
        var b,c=this;
        this.checkItemList=new ge([],{
            model:this
        });
        b=function(){
            var b;
            b=c.checkItemList.filter(function(b){
                return/^placeholder/.test(b.id)
                });
            c.checkItemList.refresh(c.get("checkItems"),{
                model:c
            });
            return c.checkItemList.add(b)
            };
            
        b();
        this.bind("change:checkItems",b);
        return this.setReady()
        };
        
    c.prototype.withIdParents=function(b){
        return this.getBoard().onId(function(c){
            return b([c])
            })
        };
        
    c.prototype.getBoard=function(){
        var b;
        b=this.collection.options.model;
        switch(b.typeName){
            case "Board":
                return b;
            case "Card":
                return b.getBoard();
            default:
                return null
                }
            };
    
c.prototype.getCompletedCount=
function(b){
    var c;
    c=0;
    this.checkItemList.each(function(d){
        var g;
        g=b.checkItemStateList.detect(function(b){
            return b.get("idCheckItem")===d.id
            });
        if("complete"===(null!=g?g.get("state"):void 0))return c++
            });
    return c
    };
    
c.prototype.getCheckItem=function(b){
    return this.checkItemList.get(b)
    };
    
c.prototype.editable=function(){
    return this.getBoard().editable()
    };
    
c.prototype.calcPos=function(b,c){
    return m.calcPos(b,this.checkItemList,c)
    };
    
return c
}(la);
pc=function(d){
    function c(){
        return c.__super__.constructor.apply(this,
            arguments)
        }
        u(c,d);
    c.prototype.model=ie;
    c.prototype.initialize=function(b,c){
        this.options=c
        };
        
    c.prototype.comparator=function(b){
        return b.get("name")
        };
        
    c.prototype.idList=function(){
        return this.pluck("id")
        };
        
    return c
    }(Fa);
ae=function(d){
    function c(){
        this.addChecklist=i(this.addChecklist,this);
        this.render=i(this.render,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.getViewTitle=function(){
        return"Add Checklist"
        };
        
    c.prototype.events={
        "click .js-add-checklist":"addChecklist",
        "submit form":"addChecklist"
    };
    
    c.prototype.render=function(){
        $(this.el).html(t.fill("checklist_add_menu",[]));
        return this
        };
        
    c.prototype.addChecklist=function(b){
        var c,d=this;
        m.stop(b);
        c=$(this.el).find(".js-checklist-title").val();
        0!==c.length&&("Checklist"===c?n("Checklist","Create","Default Title (Checklist)"):n("Checklist","Create","Renamed"),this.model.onId(function(){
            return d.model.getBoard().checklistList.create({
                name:c
            },{
                success:function(b){
                    return b.onId(function(c){
                        var e;
                        d.model.addChecklist(c);
                        e=b.getView(uc,d.model.cid,{
                            card:d.model
                            });
                        return _.defer(function(){
                            e.newTaskInput.focus().select()
                            })
                        })
                    }
                })
        }),v.hide())
    };
    
return c
}(N);
fe=function(d){
    function c(){
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.typeName="CheckItem";
    c.prototype.initialize=function(){
        return Api.init(this)
        };
        
    c.prototype.postInitialize=function(){
        return this.setReady()
        };
        
    c.prototype.withIdParents=function(b){
        var c;
        c=this.getChecklist();
        return c.onId(function(d){
            c.withIdParents(function(c){
                b([d].concat(c))
                })
            })
        };
    c.prototype.getChecklist=function(){
        return this.collection.options.model
        };
        
    c.prototype.editable=function(){
        return this.getChecklist().editable()
        };
        
    c.prototype.getContext=function(){
        return this.getChecklist()
        };
        
    c.prototype.move=function(b){
        this.set("pos",this.getChecklist().calcPos(b,this));
        this.save();
        this.collection.sort({
            silent:!0
            })
        };
        
    return c
    }(la);
ge=function(d){
    function c(){
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.model=fe;
    c.prototype.initialize=function(b,c){
        this.options=
        c;
        this.bind("change:pos",this.sort)
        };
        
    c.prototype.comparator=function(b){
        return b.get("pos")
        };
        
    return c
    }(Fa);
he=function(d){
    function c(){
        this.render=i(this.render,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.className="check-item task";
    c.prototype.initialize=function(){
        this.model.bind("change",this.render);
        return c.__super__.initialize.apply(this,arguments)
        };
        
    c.prototype.events={
        "click .checkbox":"toggleState",
        "click .js-delete-item":"delete",
        "click .js-convert-item-to-card":"convertToCard",
        movecheckitem:"moveCheckItem"
    };
    
    c.prototype.getCheckItemState=function(){
        var b=this;
        return this.getCard().checkItemStateList.detect(function(c){
            return c.get("idCheckItem")===b.model.id
            })
        };
        
    c.prototype.getCard=function(){
        return this.options.card
        };
        
    c.prototype.customSet=function(b,c){
        var d=this;
        return"name"===b?(c=$.trim(c),""!==c&&this.model.withIdParents(function(b){
            return d.model.api.changeName({
                name:c,
                idCard:d.getCard().id,
                idParents:b
            })
            }),!0):!1
        };
        
    c.prototype.render=function(){
        var b,c;
        c=this.model.toJSON();
        b=this.getCheckItemState();
        c.state=null!=b?b.get("state"):void 0;
        c.checked="complete"===c.state;
        $(this.el).html(t.fill("check_item",c,{
            editable:this.model.editable()
            })).toggleClass("complete",c.checked);
        this.recallDrafts();
        return this
        };
        
    c.prototype.toggleState=function(){
        var b,c;
        this.model.editable()&&(c=!$(this.el).hasClass("complete"),$(this.el).toggleClass("complete",c),b=this.getCard(),b.api.setChecklistTaskState({
            state:c?"complete":"",
            idCheckItem:this.model.id
            }))
        };
        
    c.prototype["delete"]=function(b){
        m.stop(b);
        this.model.destroy()
        };
        
    c.prototype.convertToCard=function(b){
        var c=this;
        m.stop(b);
        this.model.withIdParents(function(b){
            c.model.getChecklist().checkItemList.remove(c.model);
            c.model.api.convertToCard({
                idCard:c.getCard().id,
                idParents:b
            })
            })
        };
        
    c.prototype.moveCheckItem=function(b,c){
        this.model.move(c.item.parent().children().index(c.item))
        };
        
    return c
    }(N);
uc=function(d){
    function c(){
        this.addTask=i(this.addTask,this);
        this.cancelItemEditing=i(this.cancelItemEditing,this);
        this.renderCheckItems=i(this.renderCheckItems,
            this);
        this.renderName=i(this.renderName,this);
        this.render=i(this.render,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.className="checklist";
    c.prototype.events={
        "keypress .new-task-text":"submitTask",
        "click .js-add-checklist-item":"submitTask",
        "click .js-cancel-checklist-item":"cancelItemEditing",
        "click .new-task-text":"focusTaskInput",
        "focus .new-task-text":"inputTask",
        "click .js-open-checklist-menu":"openChecklistMenu",
        "sortstop .task-list":"sortStop"
    };
    
    c.prototype.initialize=
    function(){
        var b;
        b=this.model;
        b.checkItemList.onAddRemove(this.renderCheckItems);
        b.bind("change:name",this.renderName);
        this.getCard().checkItemStateList.bind("change:state",this.renderCheckItems).onAddRemove(this.renderCheckItems);
        return this.nextPos=0
        };
        
    c.prototype.getCard=function(){
        return this.options.card
        };
        
    c.prototype.commitEdits=function(b){
        var c=this;
        if(N.prototype.commitEdits.apply(this,arguments))return _.defer(function(){
            if(!c.model.checkItemList.length)return c.newTaskInput.focus()
                }),!0
        };
    c.prototype.render=function(){
        var b,c;
        J("render","rendering checklist state "+this.model.get("name"));
        b=$(this.el).html(t.fill("checklist",this.model.toJSON(),{
            editable:this.model.editable()
            })).find(".task-list");
        null!=(c=this.getCard())&&c.editable()&&b.sortable({
            axis:"y",
            containment:".window-main-col",
            delay:"75",
            distance:"7",
            tolerance:"pointer",
            placeholder:"task placeholder",
            items:".task",
            start:function(b,c){
                var d;
                d=$(c.helper).height();
                return $(c.placeholder).height(d)
                }
            });
    this.newTaskInput=$(this.el).find("input.new-task-text");
    this.newTaskInput.fixPlaceholder();
    return this.renderName().renderCheckItems()
    };
    
c.prototype.renderName=function(){
    $(this.el).find("div.checklist-title[attr=name] .current").text(this.model.get("name"));
    return this
    };
    
c.prototype.renderCheckItems=function(){
    var b,c,d,g,h=this;
    g=$(this.el).find(".task-list");
    g.empty();
    b=this.getCard();
    this.model.checkItemList.each(function(c){
        c=c.getView(he,"card_"+b.cid+"_"+h.model.cid,{
            card:b
        });
        return g.append(c.render().el)
        });
    c=this.model.getCompletedCount(this.getCard());
    d=this.model.checkItemList.length;
    c=0<d?Math.round(100*c/d):0;
    $(this.el).find(".progress-current").width(c+"%");
    $(this.el).find(".progress-percentage").text(c+"%");
    return this
    };
    
c.prototype.cancelItemEditing=function(b){
    $(b.target).closest(".new-task").find(".new-task-text").val("");
    R.cancelEdits();
    return!1
    };
    
c.prototype.addTask=function(b){
    var c,d,g=this;
    c=this.model;
    d=0<c.checkItemList.length?c.checkItemList.at(c.checkItemList.length-1).get("pos")+16384:16384;
    this.nextPos>d&&(d=this.nextPos);
    d+=Math.floor(1024*
        Math.random());
    this.nextPos=d+16384;
    c.withIdParents(function(h){
        var j,h={
            name:b,
            type:"check",
            pos:d,
            idParents:h
        };
        
        j=c.checkItemList.addPlaceholder(h);
        return c.api.addTask(h,function(b){
            j();
            if(b.checkItems)return g.model.set({
                checkItems:b.checkItems
                })
            },j)
        })
    };
    
c.prototype.inputTask=function(){
    R.cancelEdits(this.newTaskInput);
    $(this.el).find(".new-task").addClass("focus");
    return!1
    };
    
c.prototype.focusTaskInput=function(){
    $(this.newTaskInput).focus()
    };
    
c.prototype.submitTask=function(b){
    var c;
    if("keypress"!==
        b.type||m.isSubmitKey(b))if(m.stopPropagation(b),c=jQuery.trim(this.newTaskInput.val()),""!==c)return this.addTask(c),this.newTaskInput.val(""),"keypress"===b.type?this.newTaskInput.focus():R.cancelEdits(),!1
        };
        
c.prototype.sortStop=function(b,c){
    m.stopPropagation(b);
    c.item.trigger("movecheckitem",[c])
    };
    
c.prototype.openChecklistMenu=function(b){
    var c;
    m.stop(b);
    c=this.getCard();
    n("Checklist","Open Checklist Menu");
    return v.toggle({
        elem:$(b.target).closest(".js-open-checklist-menu")[0],
        top:25,
        view:this.model.getView(je,
            c.id,{
                card:c
            })
        })
    };
    
return c
}(N);
je=function(d){
    function c(){
        this.confirmDeleteChecklist=i(this.confirmDeleteChecklist,this);
        this.render=i(this.render,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.getViewTitle=function(){
        return this.model.get("name")
        };
        
    c.prototype.initialize=function(){
        return this.card=this.options.card
        };
        
    c.prototype.events={
        "click .js-delete-checklist":"confirmDeleteChecklist"
    };
    
    c.prototype.render=function(){
        $(this.el).html(t.fill("popover_checklist_menu",

        {}));
        return this
        };
        
    c.prototype.confirmDeleteChecklist=function(b){
        m.stop(b);
        v.pushView({
            view:this.model.getView(ke,"deleteChecklist",{
                card:this.card
                })
            })
        };
        
    return c
    }(N);
ke=function(d){
    function c(){
        this.deleteChecklist=i(this.deleteChecklist,this);
        this.render=i(this.render,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.getViewTitle=function(){
        return"Delete "+this.model.get("name")+"?"
        };
        
    c.prototype.events={
        "click .js-delete-checklist":"deleteChecklist"
    };
    
    c.prototype.render=
    function(){
        $(this.el).html(t.fill("popover_checklist_delete_confirm",{}));
        return this
        };
        
    c.prototype.deleteChecklist=function(b){
        m.stop(b);
        n("Checklist","Delete Checklist");
        this.options.card.removeChecklist(this.model.id);
        v.hide()
        };
        
    return c
    }(N)
}
if(C("checkitemstate")){
    var le,Xd,D={}.hasOwnProperty,u=function(d,c){
        function b(){
            this.constructor=d
            }
            for(var e in c)D.call(c,e)&&(d[e]=c[e]);b.prototype=c.prototype;
        d.prototype=new b;
        d.__super__=c.prototype;
        return d
        };
        
    le=function(d){
        function c(){
            return c.__super__.constructor.apply(this,
                arguments)
            }
            u(c,d);
        c.prototype.typeName="CheckItemState";
        c.prototype.postInitialize=function(){
            return this.setReady()
            };
            
        c.prototype.withIdParents=function(b){
            var c;
            c=this.getCard();
            return c.onId(function(d){
                return c.withIdParents(function(c){
                    return b([d].concat(c))
                    })
                })
            };
            
        c.prototype.getCard=function(){
            return this.collection.options.model
            };
            
        return c
        }(la);
    Xd=function(d){
        function c(){
            return c.__super__.constructor.apply(this,arguments)
            }
            u(c,d);
        c.prototype.model=le;
        c.prototype.initialize=function(b,c){
            this.options=
            c
            };
            
        return c
        }(Fa)
    }
    if(C("datePicker")){
    var $a,i=function(d,c){
        return function(){
            return d.apply(c,arguments)
            }
        },D={}.hasOwnProperty,u=function(d,c){
    function b(){
        this.constructor=d
        }
        for(var e in c)D.call(c,e)&&(d[e]=c[e]);b.prototype=c.prototype;
    d.prototype=new b;
    d.__super__=c.prototype;
    return d
    };
    
$a=function(d){
    function c(){
        this.render=i(this.render,this);
        this.updateDate=i(this.updateDate,this);
        this.dateKeyDown=i(this.dateKeyDown,this);
        this.removeDueDate=i(this.removeDueDate,this);
        this.submitDueDate=i(this.submitDueDate,
            this);
        this.cancelDueDate=i(this.cancelDueDate,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.getViewTitle=function(){
        return"Change Due Date"
        };
        
    c.prototype.initialize=function(){};
    
    c.prototype.events={
        "click .js-cancel-edit":"cancelDueDate",
        "click .js-save-edit":"submitDueDate",
        "click .js-remove-date":"removeDueDate",
        "keydown .js-dpicker-date-input":"dateKeyDown",
        "blur .js-dpicker-date-input":"updateDate"
    };
    
    c.prototype._closeDialog=function(b){
        m.stop(b);
        return v.hide()
        };
    c.prototype._getDate=function(){
        var b,c;
        if($(this.el).find(".js-dpicker-date-input").is(".error"))return null;
        b=$(this.el).find(".js-dpicker-date-input").val();
        c=$(this.el).find(".js-dpicker-time-input").val();
        c=c.replace(/^((?:1[3-9]|2\d):\d\d)\s+[AP]M$/i,function(b,c){
            return c
            });
        return U.parse(""+b+" "+c)
        };
        
    c.prototype.cancelDueDate=function(b){
        return this._closeDialog(b)
        };
        
    c.prototype.submitDueDate=function(b){
        var c;
        if(c=this._getDate())return this._closeDialog(b),T.set("dueDate",c.getTime()),this.model.api.setDueDate({
            dueDate:c
        });
        m.stop(b)
        };
        
    c.prototype.removeDueDate=function(b){
        this._closeDialog(b);
        return this.model.api.setDueDate({
            dueDate:null
        })
        };
        
    c.prototype.dateKeyDown=function(b){
        if(m.isSubmitKey(b))return this.updateDate(b)
            };
            
    c.prototype.updateDate=function(){
        var b,c,d,g;
        c=$(this.el).find(".js-dpicker-date-input");
        b=$(this.el).find(".js-dpicker-cal");
        g=c.val().replace(/\s/g,"").replace(/-/g,"/");
        d=Date.parse(U.convertDateFormat(g));
        g=_.select(g.split("/"),function(b){
            return 0<b
            });
        if(!d||2>_.select(g,function(b){
            return 3>
            b.length&&31>=b
            }).length)c.addClass("error");else return c.removeClass("error"),3>g.length&&d<Date.today()&&d.setFullYear(d.getFullYear()+1),b.datepicker("setDate",U.toShortString(d))
            };
            
    c.prototype.render=function(){
        var b,c,d,g,h,j,i,o,q,m,n,s,v,u;
        h=null!=(d=this.model.get("badges"))?d.due:void 0;
        d=this.model.toJSON();
        d.hasDueDate=null!=h;
        $(this.el).html(t.fill("date_picker",d,{
            editable:z.isMe(this.model)
            }));
        q=$(this.el).find(".js-dpicker-time-input");
        m=$(this.el).find(".js-dpicker-time-select");
        g=
        $(this.el).find(".js-dpicker-date-input");
        b=$(this.el).find(".js-dpicker-cal");
        h?h=U.parse(h):null!=T.get("dueDate")&&(c=new Date(T.get("dueDate")),c>new Date&&(h=c));
        _.isDate(h)||(h=null!=c?Date.today().add({
            days:1,
            hours:c.getHours()
            }):Date.today().add({
            days:1,
            hours:12
        }));
        _.delay(function(){
            return b.datepicker({
                altField:".js-dpicker-date-input",
                defaultDate:h,
                showOtherMonths:!0,
                selectOtherMonths:!0,
                dateFormat:U.isUS?"mm/dd/yy":"dd/mm/yy",
                onSelect:function(){
                    return g.removeClass("error")
                    }
                })
        },20);
    g.val(h.toString("MM/dd/yyyy"));
    q.val(h.toString("h:mm tt"));
    i=["AM","PM"];
    c=[12,1,2,3,4,5,6,7,8,9,10,11];
    for(n=0,v=i.length;n<v;n++){
        d=i[n];
        for(s=0,u=c.length;s<u;s++)j=c[s],o='<option value="'+j+":00 "+d+'">'+j+":00 "+d+"</option>",j='<option value="'+j+":30 "+d+'">'+j+":30 "+d+"</option>",m.append(o,j)
            }
            c=h.toString("h:00 tt");
    m.find('option[value="'+c+'"]').attr("selected",!0);
    m.change(function(){
        var b;
        b=m.find("option:selected").val();
        return q.val(b)
        });
    if(WindowSize.fSmall||WindowSize.fExtraSmall)q.hide(),m.addClass("show");
    return this
    };
    
return c
}(N)
}
if(C("attachment")){
    var me,Yd,$d,D={}.hasOwnProperty,u=function(d,c){
        function b(){
            this.constructor=d
            }
            for(var e in c)D.call(c,e)&&(d[e]=c[e]);b.prototype=c.prototype;
        d.prototype=new b;
        d.__super__=c.prototype;
        return d
        },i=function(d,c){
        return function(){
            return d.apply(c,arguments)
            }
        };
    
me=function(d){
    function c(){
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.typeName="Attachment";
    c.prototype.initialize=function(){};
    
    c.prototype.postInitialize=function(){
        return this.setReady()
        };
    c.prototype.withIdParents=function(b){
        var c;
        c=this.getCard();
        return c.onId(function(d){
            return c.withIdParents(function(c){
                return b([d].concat(c))
                })
            })
        };
        
    c.prototype.getCard=function(){
        return this.collection.options.model
        };
        
    c.prototype.editable=function(){
        return this.getCard().editable()
        };
        
    return c
    }(la);
Yd=function(d){
    function c(){
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.model=me;
    c.prototype.comparator=function(b){
        return-U.parse(b.get("date"))||0
        };
        
    c.prototype.initialize=
    function(b,c){
        this.options=c
        };
        
    return c
    }(Fa);
$d=function(d){
    function c(){
        this.deleteAttachment=i(this.deleteAttachment,this);
        this.render=i(this.render,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.className="attachment";
    c.prototype.events={
        "click .js-delete-attachment":"deleteAttachment"
    };
    
    c.prototype.render=function(){
        var b;
        b=this.model.toJSON();
        b.size=ga.bytes(b.bytes);
        $(this.el).addClass("clearfix").html(t.fill("attachment",b,{
            editable:this.model.editable()
            }));
        U.update(this.el);
        return this
        };
        
    c.prototype.deleteAttachment=function(){
        n("Card Detail Sidebar","Attachment","Delete");
        return this.model.getCard().api.deleteAttachment(this.model.id)
        };
        
    return c
    }(N)
}
if(C("organization")){
    var ne,oe,Sa,pe,qe,re,se,td,te,sd,ue,Fb,ve,i=function(d,c){
        return function(){
            return d.apply(c,arguments)
            }
        },D={}.hasOwnProperty,u=function(d,c){
    function b(){
        this.constructor=d
        }
        for(var e in c)D.call(c,e)&&(d[e]=c[e]);b.prototype=c.prototype;
    d.prototype=new b;
    d.__super__=c.prototype;
    return d
    };
    
Sa=function(d){
    function c(){
        this.invited=
        i(this.invited,this);
        this.owned=i(this.owned,this);
        this.ownedByMember=i(this.ownedByMember,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.typeName="Organization";
    c.prototype.nameAttr="displayName";
    c.prototype.initialize=function(){
        Api.init(this)
        };
        
    c.prototype.postInitialize=function(){
        var b,c=this;
        this.invitationList=new hd(this.get("invitations")||[],{
            model:this
        });
        this.boardList=new lb;
        this.memberList=new jb;
        b=function(){
            c.memberList.refresh(Models.Member.getList(_.pluck(c.get("memberships"),
                "idMember")||[]),{
                model:c
            })
            };
            
        this.bind("change:memberships",b);
        b();
        b=function(){
            c.boardList.refresh(Models.Board.getList(c.get("idBoards")))
            };
            
        this.bind("change:idBoards",b);
        this.bind("change:invitations",function(){
            c.invitationList.refresh(c.get("invitations"))
            });
        b();
        this.setReady()
        };
        
    c.prototype.prefNames=["permissionLevel"];
    c.prototype.editable=function(){
        var b,c;
        b=z.me();
        c=_.detect(this.get("memberships"),function(c){
            return c.idMember===(null!=b?b.id:void 0)
            });
        return b&&"admin"===(null!=c?c.memberType:
            void 0)
        };
        
    c.prototype.getMemberType=function(b){
        return MemberOwner.getMemberType.call(this,b)
        };
        
    c.prototype.isMember=function(b){
        var c;
        return"normal"===(c=this.getMemberType(b))||"admin"===c
        };
        
    c.prototype.ownedByMember=function(b){
        return"admin"===this.getMemberType(b)
        };
        
    c.prototype.owned=function(){
        return"admin"===this.getMemberType(z.me())
        };
        
    c.prototype.invited=function(){
        return"invited"===this.getMemberType(z.me())
        };
        
    c.prototype.responseToInvite=function(b,c){
        var d;
        d=z.me();
        return d.api.respondToInvitation({
            accepted:b,
            idModel:this.id,
            token:$.cookie("invite-token-"+this.id),
            modelType:"Board"
        },function(g){
            b&&(d.set({
                idBoards:g.idBoards,
                idBoardsInvited:g.idBoardsInvited
                }),d.save());
            "function"===typeof c&&c()
            })
        };
        
    c.prototype.responseToInvite=function(b,c){
        z.me().api.respondToInvitation({
            accepted:b,
            idModel:this.id,
            token:$.cookie("invite-token-"+this.id),
            modelType:"Organization"
        },c)
        };
        
    c.prototype.acceptInvite=function(b){
        return this.responseToInvite(!0,b)
        };
        
    c.prototype.rejectInvite=function(b){
        return this.responseToInvite(!1,
            b)
        };
        
    c.prototype.toJSON=function(b){
        var d;
        null==b&&(b={});
        d=c.__super__.toJSON.apply(this,arguments);
        b.url&&(d.url=Controller.getOrganizationUrl(this.get("name")));
        return d
        };
        
    return c
    }(yb);
y.OrganizationList=Backbone.Collection.extend({
    model:Sa,
    initialize:function(){
        _.bindAll(this,"sync");
        this.bind("change:name",this.sort)
        },
    comparator:function(d){
        var c;
        return(null!=(c=d.get("name"))?c.toUpperCase():void 0)||""
        },
    sync:function(d,c,b){
        b(Models.Organization.all())
        }
    });
Fb=function(d){
    function c(){
        this.openManageMembers=
        i(this.openManageMembers,this);
        this.signupAndJoinPopover=i(this.signupAndJoinPopover,this);
        this.rejectInvite=i(this.rejectInvite,this);
        this.acceptInvite=i(this.acceptInvite,this);
        this.render=i(this.render,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.initialize=function(){
        this.model.bindEvents(this.render,"change:name","change:displayName")
        };
        
    c.prototype.events={
        "click .js-accept-invite":"acceptInvite",
        "click .js-reject-invite":"rejectInvite",
        "click .js-signup-and-join":"signupAndJoinPopover",
        "click .js-manage-members":"openManageMembers"
    };
    
    c.prototype.render=function(){
        var b,c=this;
        b=this.model.toJSON({
            prefs:!0,
            url:!0
            });
        $(this.el).html(t.fill("org_detail",b,{
            editable:this.model.editable(),
            invited:this.model.invited()
            }));
        setTimeout(function(){
            c.renderMainContent()
            },0);
        return this
        };
        
    c.prototype.setActiveView=function(b){
        $(b).addClass("active")
        };
        
    c.prototype.acceptInvite=function(b){
        m.preventDefault(b);
        $(this.el).find(".js-accept-invite").attr("disabled","disabled");
        this.model.acceptInvite(function(){
            return y.location.reload()
            });
        return!1
        };
        
    c.prototype.rejectInvite=function(b){
        m.preventDefault(b);
        this.model.rejectInvite(function(){
            return y.location.reload()
            });
        return!1
        };
        
    c.prototype.signupAndJoinPopover=function(b){
        m.stop(b);
        v.toggle({
            elem:b.target,
            top:40,
            view:this.model.getView(ve)
            })
        };
        
    c.prototype.openManageMembers=function(b){
        m.stop(b);
        return v.toggle({
            elem:$(this.el).find(".js-manage-members")[0],
            top:35,
            view:this.model.getView(ne)
            })
        };
        
    return c
    }(N);
ve=function(d){
    function c(){
        this.setAutoAccept=i(this.setAutoAccept,this);
        this.render=
        i(this.render,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.getViewTitle=function(){
        return"Create New Account"
        };
        
    c.prototype.events={
        "click .js-google-confirm-account":"setAutoAccept",
        "click .js-confirm-email-account":"setAutoAccept"
    };
    
    c.prototype.render=function(){
        var b;
        b={
            email:$.cookie("email"),
            returnUrl:Controller.getOrganizationUrl(this.model.get("name"))
            };
            
        $(this.el).html(t.fill("popover_signup",b));
        return this
        };
        
    c.prototype.setAutoAccept=function(){
        return $.cookie("accept-organization-invite-"+
            this.model.id,"1",{
                expires:1,
                path:"/"
            })
        };
        
    return c
    }(N);
sd=function(d){
    function c(){
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.tagName="ul";
    c.prototype.initialize=function(){
        _.bindAll(this,"render");
        this.model.organizationList.bind("change:closed",this.render).bind("refresh",this.render).bind("add",this.render).bind("remove",this.render)
        };
        
    c.prototype.render=function(){
        var b,c,d,g;
        b=this.model;
        $(this.el).html("");
        g=b.organizationList.models;
        for(b=0,d=g.length;b<d;b++)c=g[b],
            c=new te({
                model:c
            }),$(this.el).append(c.render().el);
        return this
        };
        
    return c
    }(Backbone.View);
te=function(d){
    function c(){
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.tagName="li";
    c.prototype.initialize=function(){
        _.bindAll(this,"render")
        };
        
    c.prototype.render=function(){
        var b;
        b=this.model.toJSON({
            prefs:!0,
            url:!0
            });
        $(this.el).html(t.fill("member_organization",b));
        return this
        };
        
    return c
    }(Backbone.View);
ue=function(d){
    function c(){
        this.renderMembers=i(this.renderMembers,this);
        this.renderBoards=
        i(this.renderBoards,this);
        this.renderMainContent=i(this.renderMainContent,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.initialize=function(){
        c.__super__.initialize.apply(this,arguments);
        this.model.memberList.bind("change:status",this.renderMembers).onAddRemove(this.renderMembers);
        this.model.boardList.onAddRemove(this.renderMainContent)
        };
        
    c.prototype.renderMainContent=function(){
        var b,c;
        b=this.model.toJSON();
        b.websiteHref=m.sanitizeWebAddress(b.website);
        b.empty=0===
        this.model.boardList.length;
        b.descriptionHtml=ga.textAsHtml(b.desc,{
            convertNewlines:!0
            });
        c=this.model.get("memberships")?c=_.detect(this.model.get("memberships"),function(b){
            return z.isMe(b.idMember)
            }):void 0;
        b.isOrgMember=z.isMe(this.model)||c?!0:!1;
        $(this.el).find(".window-main-col").html(t.fill("org_profile",b,{
            editable:this.model.editable(),
            invited:this.model.invited()
            }));
        this.renderMembers().renderBoards();
        this.setActiveView(".js-org-profile");
        return this
        };
        
    c.prototype.renderBoards=function(){
        var b;
        b=this.model.getView(Gd,this.model.id);
        $(this.el).find(".js-boards-list").html(b.render().el);
        return this
        };
        
    c.prototype.renderMembers=function(){
        MemberOwner.renderMembers.call(this,".list-org-members",yd);
        return this
        };
        
    return c
    }(Fb);
pe=function(d){
    function c(){
        this.orgDeleteConfirm=i(this.orgDeleteConfirm,this);
        this.renderMainContent=i(this.renderMainContent,this);
        this.setValue=i(this.setValue,this);
        this.getValue=i(this.getValue,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.events=

    {
        "click .js-save-changes":"saveChanges",
        "click .js-confirm-delete-org":"orgDeleteConfirm"
    };
    
    c.prototype.getValue=function(b){
        return $(this.el).find("[name="+b+"]").val()
        };
        
    c.prototype.setValue=function(b,c){
        return $(this.el).find("[name="+b+"]").val(c)
        };
        
    c.prototype.renderMainContent=function(){
        var b;
        b=this.model.toJSON({
            prefs:!0
            });
        $(this.el).find(".window-main-col").html(t.fill("org_account",b,{
            editable:this.model.editable()
            }));
        this.setActiveView(".js-org-account");
        return this
        };
        
    c.prototype.saveChanges=
    function(b){
        var c,d,g,h,j;
        d=this;
        m.preventDefault(b);
        b={};
        
        j=["displayName","name","website","desc"];
        for(g=0,h=j.length;g<h;g++)c=j[g],b[c]=this.getValue(c);
        j=this.model.prefNames;
        for(g=0,h=j.length;g<h;g++)c=j[g],b["prefs/"+c]=this.getValue(c);
        b.name=b.name.toLowerCase();
        this.setValue("name",b.name);
        return this.model.updateNew(b,{
            waitForServer:!0
            },function(b,c){
            return b?($(d.el).find(".error").text(null!=b?b:"error").show(),m.scrollToTop()):Controller.organizationProfileView(null!=c?c.name:void 0)
            })
        };
    c.prototype.orgDeleteConfirm=function(b){
        m.stop(b);
        v.toggle({
            elem:b.target,
            top:35,
            view:this.model.getView(oe)
            })
        };
        
    return c
    }(Fb);
qe=function(d){
    function c(){
        this.renderMainContent=i(this.renderMainContent,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.renderMainContent=function(){
        this.model.toJSON({
            prefs:!0
            });
        $(this.el).find(".window-main-col").html(this.model.getView(Hd).render().el);
        return this
        };
        
    return c
    }(Fb);
oe=function(d){
    function c(){
        this.cancelDeleteOrg=i(this.cancelDeleteOrg,
            this);
        this.deleteOrg=i(this.deleteOrg,this);
        this.render=i(this.render,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.getViewTitle=function(){
        return"Delete Organization?"
        };
        
    c.prototype.events={
        "click .js-delete-org":"deleteOrg",
        "click .js-cancel-delete":"cancelDeleteOrg"
    };
    
    c.prototype.render=function(){
        $(this.el).html(t.fill("popover_confirm_org_delete"));
        return this
        };
        
    c.prototype.deleteOrg=function(b){
        m.stop(b);
        $(this.el).find(".js-delete-org").attr("disabled","disabled");
        this.model.destroy({
            success:function(){
                v.hide();
                return y.navigate("/")
                }
            })
    };
    
c.prototype.cancelDeleteOrg=function(b){
    m.stop(b);
    v.hide()
    };
    
return c
}(E);
ne=function(d){
    function c(){
        this.canRemoveInvitation=i(this.canRemoveInvitation,this);
        this.removeInvitation=i(this.removeInvitation,this);
        this.clearSearchResults=i(this.clearSearchResults,this);
        this.sendMemberInvitation=i(this.sendMemberInvitation,this);
        this.sendEmailInvitation=i(this.sendEmailInvitation,this);
        this.hoverMember=i(this.hoverMember,this);
        this.keydownEvent=i(this.keydownEvent,this);
        this.search=i(this.search,this);
        this.searchPaste=i(this.searchPaste,this);
        this.renderSearchResults=i(this.renderSearchResults,this);
        this.renderInvitations=i(this.renderInvitations,this);
        this.render=i(this.render,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.getViewTitle=function(){
        return"Members"
        };
        
    c.prototype.initialize=function(){
        this.invitationList=this.model.invitationList;
        this.invitationList.onAddRemove(this.renderInvitations).bind("change",
            this.renderInvitations)
        };
        
    c.prototype.events={
        "click .js-search-results .js-select-member":"sendMemberInvitation",
        "click .js-search-results .email-invite":"sendEmailInvitation",
        "paste .js-search-input":"searchPaste",
        "click .js-remove-invitation":"removeInvitation",
        "hover .js-select-member":"hoverMember"
    };
    
    c.prototype.render=function(){
        var b=this;
        $(this.el).html(t.fill("manage_members",{
            canInvite:!0,
            placeholder:"Search or add email address"
        },{
            editable:this.model.editable()
            }));
        _.delay(function(){
            b.renderInvitations();
            b.input=$(b.el).find(".js-search-input");
            return b.input.click(function(b){
                return m.stop(b)
                }).keyup(_.debounce(b.search,500)).keydown(b.keydownEvent).focus()
            },10);
        this.loadingEl=$(this.el).find(".js-loading");
        v.calcTop();
        return this
        };
        
    c.prototype.renderInvitations=function(){
        var b,c,d,g=this;
        c=$(this.el).find(".js-pending-invites");
        b=c.find(".js-list").empty();
        d=this.invitationList;
        c.toggle(0<d.length);
        d.each(function(c){
            var d,e,f;
            f=Models.Member.get(c.get("idMemberInviter"));
            d={
                MemberInviter:null!=
                f?f.toJSON():void 0,
                idMemberInvited:c.get("idMemberInvited"),
                dateExpires:c.get("dateExpires"),
                email:c.get("email"),
                canRemove:g.canRemoveInvitation(c)
                };
                
            d.idMemberInvited&&(e=Models.Member.get(d.idMemberInvited),null!=e&&(d.MemberInvited=e.toJSON()));
            d=$(t.fill("invitation",d,{},{
                member:t.member,
                member_inline:t.member_inline
                }));
            d.find(".inviter .inline-member-container").data("member",f);
            null!=e&&d.find(".invitee .inline-member-container").data("member",e);
            d.data("id",c.get("id"));
            b.append(d)
            });
        c.toggle(0<
            d.length);
        U.update(this.el);
        v.calcTop();
        return this
        };
        
    c.prototype.renderSearchResults=function(b,c){
        var d,g,h,j,i,o,q,n,u,s;
        o=c.members;
        j=c.invitedEmails;
        u=c.uninvitedEmails;
        d=$(this.el);
        h=d.find(".js-search-results");
        g=h.find(".js-list").empty();
        n=_.all([j,u,o],_.isEmpty);
        i=3<=b.trim().length;
        d.find(".js-no-results").toggle(n&&i);
        h.toggle(!n);
        d=_.map(this.invitationList.models,function(b){
            return b.get("idMemberInvited")
            });
        h={
            invited:"invited",
            joined:"joined",
            uninvitedExact:"will-invite",
            uninvitedFuzzy:""
        };
        q={
            invited:2,
            joined:3,
            uninvitedExact:1,
            uninvitedFuzzy:1
        };
        
        for(n=0,s=u.length;n<s;n++)i=u[n],$(t.fill("member_search_result_email",{
            email:i,
            isInvitable:!0,
            className:"will-invite"
        })).data({
            email:i
        }).appendTo(g);
        for(u=0,n=j.length;u<n;u++)i=j[u],$(t.fill("member_search_result_email",{
            email:i,
            isInvitable:!1,
            className:"invited",
            extraText:"already invited"
        })).appendTo(g);
        s=_.sortBy(o,function(b){
            return 1E4*q[b.type]-b.similarity
            });
        for(i=0,n=s.length;i<n;i++)o=s[i],u=o.type,delete o.type,delete o.similarity,
            null==Models.Member.get(o.id)&&Models.Member.add(new ta(o)),j=_.extend({
                className:h[u],
                isInvitable:"uninvitedFuzzy"===u||"uninvitedExact"===u
                },o),null==j.id&&(j.id=o.id),_.include(d,o.id)&&(j.extraText="invited"),"joined"===h[u]&&(j.extraText="already joined"),g.append(t.fill("select_member",j,{},{
                member:t.member
                }));
        g=$(this.el).find(".js-search-results .js-list li:first");
        m.selectMenuItem($(this.el).find(".js-org-members .js-list"),"li",g);
        this.loadingEl.hide();
        v.calcTop()
        };
        
    c.prototype.searchPaste=
    function(){
        this.loadingEl.show();
        return this.input.keyup()
        };
        
    c.prototype.search=function(b){
        var c,d,g=this;
        if(!((d=b.keyCode)===pa||d===na||d===ka||d===Y||d===ja||d===X||d===ia||d===oa))this.loadingEl.show(),c=this.input.val().toLowerCase().trim(),rpc.invoke("searchOrganizationMembers",[c,this.model.id],function(b){
            return g.renderSearchResults(c,b)
            })
        };
        
    c.prototype.keydownEvent=function(b){
        var c,d;
        if(!((c=b.keyCode)===pa||c===na||c===ka||c===ja||c===ia||c===oa))if(b.keyCode===ba)0<$(this.el).find(".js-search-results .js-list .selected .js-select-member").length?
            (m.stop(b),$(this.el).find(".js-search-results .js-list .selected:first .js-select-member").click()):0<$(this.el).find(".js-search-results .js-list .email-invite").length&&(m.stop(b),$(this.el).find(".email-invite:first").click());
        else if((d=b.keyCode)===Y||d===X)m.stop(b),m.navMenuList($(this.el).find(".js-search-results .js-list"),"li",b.keyCode)
            };
            
    c.prototype.hoverMember=function(b){
        b=$(b.target).closest(".item");
        return m.selectMenuItem($(this.el).find(".pop-over-member-list"),".item",b)
        };
        
    c.prototype.sendEmailInvitation=
    function(b){
        var c,d=this;
        m.stop(b);
        n("Invitations","Send","Email Address");
        b=$(b.target).closest(".email-invite").find(".email").text();
        c=_.map(this.invitationList.models,function(b){
            return b.get("email")
            });
        _.include(c,b)||(this.clearSearchResults(),this.invitationList.create({
            email:b,
            idMemberInviter:z.myId()
            },{
            error:function(b){
                return d.invitationList.remove(b)
                }
            }))
    };
    
c.prototype.sendMemberInvitation=function(b){
    var c,d,g=this;
    m.stop(b);
    n("Invitations","Send","Member");
    b=$(b.target).closest(".js-select-member").attr("idMember");
    c=_.map(this.invitationList.models,function(b){
        return b.get("idMemberInvited")
        });
    d=_.map(this.model.memberList.models,function(b){
        return b.id
        });
    c=c.concat(d);
    _.include(c,b)||(this.clearSearchResults(),this.invitationList.create({
        idMemberInvited:b,
        idMemberInviter:z.myId()
        },{
        error:function(b){
            return g.invitationList.remove(b)
            }
        }))
};

c.prototype.clearSearchResults=function(){
    this.input.val("").focus().select();
    return $(".js-search-results").hide()
    };
    
c.prototype.removeInvitation=function(b){
    var c;
    null!=
    (c=this.invitationList.get($(b.currentTarget).closest(".invitation").data("id")))&&c.destroy({
        success:this.search
        });
    m.setCaretAtEnd(this.input[0])
    };
    
c.prototype.canRemoveInvitation=function(b){
    return b.get("idMemberInviter")===z.myId()||this.model.owned()
    };
    
return c
}(N);
re=function(d){
    function c(){
        this._set=i(this._set,this);
        this._get=i(this._get,this);
        this._findInput=i(this._findInput,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.events={
        "click .js-create-org":"createOrg",
        "submit form":"createOrg"
    };
    
    c.prototype.initialize=function(){
        _.bindAll(this,"render")
        };
        
    c.prototype.render=function(){
        $(this.el).html(t.fill("org_create",{},{
            editable:!0
            }));
        return this
        };
        
    c.prototype.createOrg=function(b){
        var c,d,g,h,j;
        m.stop(b);
        d=this._get("displayName");
        j=this._get("website");
        b=$(this.el).find("textarea[name=desc]")[0].value;
        g=$(this.el).find("select[name='permissionLevel']").val();
        h=this;
        c=$(h.el).find(".js-create-org");
        c.attr("disabled","disabled");
        this.model.organizationList.create({
            displayName:d,
            website:j,
            desc:b,
            prefs:{
                permissionLevel:g
            }
        },{
            success:function(b){
                Controller.organizationProfileView(b.get("name"))
                },
            error:function(b,d){
                c.removeAttr("disabled");
                $(h.el).find(".error").text(null!=d?d:"error").show();
                m.scrollToTop()
                }
            })
};

c.prototype._findInput=function(b){
    return $(this.el).find("input[name='"+b+"']")
    };
    
c.prototype._get=function(b){
    return this._findInput(b).val()
    };
    
c.prototype._set=function(b,c){
    this._findInput(b).val(c)
    };
    
return c
}(N);
td=function(d){
    function c(){
        this.render=i(this.render,
            this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.tagName="ul";
    c.prototype.initialize=function(b){
        this.idMember=b.idMember;
        c.__super__.initialize.apply(this,arguments);
        this.model.boardInvitedList.bind("change",this.render).bind("refresh",this.render).bind("add",this.render).bind("remove",this.render)
        };
        
    c.prototype.render=function(){
        var b=this;
        $(this.el).html(t.fill("member_invitation_list",{
            model:"Organization"
        }));
        $(this.el).find(".js-list-invitations").html("");
        this.model.organizationInvitedList.forEach(function(c){
            c=
            new se({
                model:c
            });
            return $(b.el).find(".js-list-invitations").append(c.render().el)
            });
        return this
        };
        
    return c
    }(E);
se=function(d){
    function c(){
        this.rejectInvitation=i(this.rejectInvitation,this);
        this.acceptInvitation=i(this.acceptInvitation,this);
        this.render=i(this.render,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.tagName="li";
    c.prototype.events={
        "click .js-accept-invitation":"acceptInvitation",
        "click .js-reject-invitation":"rejectInvitation"
    };
    
    c.prototype.render=function(){
        var b;
        b=this.model.toJSON({
            url:!0
            });
        $(this.el).html(t.fill("member_invitation",b));
        return this
        };
        
    c.prototype.acceptInvitation=function(){
        $(this.el).find(".js-accept-invitation").attr("disabled","disabled");
        return this.model.acceptInvite()
        };
        
    c.prototype.rejectInvitation=function(){
        return this.model.rejectInvite()
        };
        
    return c
    }(E)
}
if(C("upgrade")){
    var xc,i=function(d,c){
        return function(){
            return d.apply(c,arguments)
            }
        },D={}.hasOwnProperty,u=function(d,c){
    function b(){
        this.constructor=d
        }
        for(var e in c)D.call(c,e)&&
        (d[e]=c[e]);b.prototype=c.prototype;
    d.prototype=new b;
    d.__super__=c.prototype;
    return d
    };
    
xc=function(d){
    function c(){
        this.render=i(this.render,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.render=function(b){
        var c,d;
        c=null!=(d=null!=b?b.timeInSeconds:void 0)?d:60;
        c=Math.floor(c/60);
        return $(this.el).html(t.fill("upgrade",{
            stopped:null!=b?b.stopped:void 0,
            timeInMinutes:c,
            plural:1<c
            }))
        };
        
    c.prototype.events={
        "click .js-upgrade":"upgrade",
        "click .js-stop-upgrade":"stopUpgrade"
    };
    c.prototype.upgrade=function(){
        Controller.upgradeNow();
        return!1
        };
        
    c.prototype.stopUpgrade=function(){
        Controller.stopUpgrade();
        return!1
        };
        
    return c
    }(Backbone.View)
}
if(C("announcements")){
    var Ca,we,xe,ea,yc,zc,D={}.hasOwnProperty,u=function(d,c){
        function b(){
            this.constructor=d
            }
            for(var e in c)D.call(c,e)&&(d[e]=c[e]);b.prototype=c.prototype;
        d.prototype=new b;
        d.__super__=c.prototype;
        return d
        },i=function(d,c){
        return function(){
            return d.apply(c,arguments)
            }
        };
    
we=function(d){
    function c(b){
        c.__super__.constructor.apply(this,
            arguments)
        }
        u(c,d);
    c.prototype.typeName="Announcement";
    c.prototype._key=function(){
        return"announcement-"+this.id+"-read"
        };
        
    c.prototype.isUnread=function(){
        return!T.get(this._key())
        };
        
    c.prototype.markRead=function(){
        $.post("/announcements/dismiss",{
            id:this.id
            });
        T.set(this._key(),!0);
        return this.trigger("change:unread")
        };
        
    return c
    }(la);
xe=function(d){
    function c(){
        this.next=i(this.next,this);
        this.render=i(this.render,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.events={
        "click .js-dismiss":"next",
        "click .js-all":"openAnnouncements"
    };
    
    c.prototype.render=function(){
        var b;
        b=this.model.toJSON();
        b.dismissText="Dismiss";
        1<ea.unreadCount()&&(b.dismissText="Next");
        $(this.el).html(t.fill("announcement",b));
        return this
        };
        
    c.prototype.next=function(){
        return this.model.markRead()
        };
        
    c.prototype.openAnnouncements=function(){
        n("Info","Announcements - View All Announcements");
        F.show({
            view:z.me().getView(zc),
            displayType:"slim"
        })
        };
        
    return c
    }(E);
zc=function(d){
    function c(){
        this.clickFacebook=i(this.clickFacebook,
            this);
        this.clickTwitter=i(this.clickTwitter,this);
        this.clickBlog=i(this.clickBlog,this);
        this.render=i(this.render,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.initialize=function(){
        return ea.onAddRemove(this.render)
        };
        
    c.prototype.events={
        "click .js-blog":"clickBlog",
        "click .js-t":"clickTwitter",
        "click .js-fb":"clickFacebook"
    };
    
    c.prototype.render=function(){
        var b,c,d,g;
        c={
            announcement:t.announcement
            };
            
        b={
            announcements:Ca.toJSON()
            };
            
        $(this.el).html(t.fill("announcements_list",
            b,{},c));
        g=ea.getUnread();
        for(c=0,d=g.length;c<d;c++)b=g[c],b.markRead();
        return this
        };
        
    c.prototype.clickBlog=function(){
        n("Info","Announcements List - Trello Blog")
        };
        
    c.prototype.clickTwitter=function(){
        n("Info","Announcements List - Twitter Link")
        };
        
    c.prototype.clickFacebook=function(){
        n("Info","Announcements List - Facebook Link")
        };
        
    return c
    }(E);
yc=function(d){
    function c(b,d){
        this.requiresLogin=d.requiresLogin;
        this.dataUrl=d.dataUrl;
        this.sync=i(this.sync,this);
        c.__super__.constructor.apply(this,arguments)
        }
    u(c,d);
    c.prototype.model=we;
    c.prototype.sync=function(b,c,d){
        if(!this.requiresLogin||z.isLoggedIn())return $.get(this.dataUrl,d)
            };
            
    c.prototype.getUnread=function(){
        return this.filter(function(b){
            return b.isUnread()
            })
        };
        
    c.prototype.unreadCount=function(){
        return this.filter(function(b){
            return b.isUnread()
            }).length
        };
        
    c.prototype.top=function(){
        return this.detect(function(b){
            return b.isUnread()
            })
        };
        
    return c
    }(wa);
ea=new yc([],{
    requiresLogin:!0,
    dataUrl:"/announcements"
});
Ca=new yc([],{
    requiresLogin:!1,
    dataUrl:"/announcements/all"
});
ea.fetch();
setInterval(function(){
    return ea.fetch()
    },6E4*(10+5*Math.random()))
}
C("window_size")&&(i=function(d,c){
    return function(){
        return d.apply(c,arguments)
        }
    },y.WindowSize=new (function(){
    function d(){
        this.calc=i(this.calc,this)
        }
        d.prototype.calc=function(){
        var c;
        c=$(y).width();
        this.fExtraLarge=this.fLarge=this.fMedium=this.fSmall=this.fExtraSmall=!1;
        1280<c?this.fExtraLarge=!0:850<c?this.fLarge=!0:700<c?this.fMedium=!0:500<c?this.fSmall=!0:this.fExtraSmall=!0;
        return $("body").toggleClass("extra-large-window",
            this.fExtraLarge).toggleClass("large-window",this.fLarge).toggleClass("medium-window",this.fMedium).toggleClass("small-window",this.fSmall).toggleClass("extra-small-window",this.fExtraSmall)
        };
        
    return d
    }()));
C("window_resize_watcher",!0)&&$(function(){
    var d;
    WindowSize.calc();
    d=null;
    return $(y).resize(function(){
        clearTimeout(d);
        d=setTimeout(WindowSize.calc,200)
        })
    });
C("list_guide")&&(i=function(d,c){
    return function(){
        return d.apply(c,arguments)
        }
    },y.ListGuide=new (function(){
    function d(){
        this.scroll=i(this.scroll,
            this);
        this.posListGuide=i(this.posListGuide,this);
        this.calcVisLists=i(this.calcVisLists,this);
        this.debounced_calcVisLists=i(this.debounced_calcVisLists,this);
        this.build_and_calc=i(this.build_and_calc,this);
        this.calc_num_cards=i(this.calc_num_cards,this);
        this.calc=i(this.calc,this);
        this.build=i(this.build,this);
        this.reset=i(this.reset,this)
        }
        d.prototype.reset=function(){
        $(".list-guide").height("").css({
            position:"",
            top:"",
            "max-height":""
        });
        $(".list-guide-wrapper").height("").css({
            "max-height":""
        });
        return $(".list-link").removeClass("visible first-visible-link last-visible-link")
        };
    d.prototype.build=function(){
        var c,b,d;
        if((c=$("#board"))&&c.position())if(d=$(y).height(),b=$(y).scrollTop(),(WindowSize.fLarge||WindowSize.fExtraLarge)&&$(".list-guide-wrapper").height(d-98),WindowSize.fMedium||WindowSize.fSmall){
            c=_.debounce(ListGuide.posListGuide,150);
            $(document).scroll(c);
            if(100>b)return $(".list-guide").css({
                "max-height":d-90
                }),$(".list-guide-wrapper").css({
                "max-height":d-98
                });
            $(".list-guide").css({
                "max-height":d-20
                });
            return $(".list-guide-wrapper").css({
                "max-height":d-28
                })
            }
        };
d.prototype.calc=function(){
    var c,b,d,f,g;
    if((c=$("#board"))&&c.position())if(g=$(".list"),b=$(".list-guide"),d=b.find(".list-guide-wrapper"),f=$(".list:first").outerWidth(),d.empty(),g.each(function(){
        var b,c;
        b=$(this);
        c=[];
        c.listName=b.find(".list-title .current").text();
        b=b.find(".list-card:not(.placeholder)").length;
        c.countStr=""+b+" cards";
        1===b&&(c.countStr=c.countStr.slice(0,-1));
        return d.append(t.fill("list_guide_link",c))
        }),$(".list-link").each(function(c){
        var d,e,i,q,t;
        q=$(this);
        d=$(g[c]);
        e=0;
        d=d.position();
        i=c*(f+8);
        WindowSize.fExtraSmall&&(e=b.height());
        t=d.top+100+e;
        return q.click(function(b){
            m.stopPropagation(b);
            n("Board","List Guide","Clicked List Link");
            return WindowSize.fLarge||WindowSize.fExtraLarge?$(".list-area-wrapper").animate({
                scrollLeft:i
            },150):WindowSize.fExtraSmall?$(y).scrollTop(t+10):$(y).scrollTop(t-29)
            })
        }),WindowSize.fLarge||WindowSize.fExtraLarge)return ListGuide.debounced_calcVisLists()
        };
        
d.prototype.calc_num_cards=function(){
    var c;
    c=$(".list");
    return $(".list-link").each(function(b){
        var d,
        b=$(c[b]).find(".list-card:not(.placeholder)").length;
        d=""+b+" cards";
        1===b&&(d=d.slice(0,-1));
        return $(this).find(".list-link-sub").html(d)
        })
    };
    
d.prototype.build_and_calc=function(){
    this.build();
    return this.calc()
    };
    
d.prototype.debounced_calcVisLists=function(){
    return _.debounce(ListGuide.calcVisLists,300)
    };
    
d.prototype.calcVisLists=function(){
    var c,b,d,f,g,h;
    if(!WindowSize.fExtraSmall&&!WindowSize.fSmall&&!WindowSize.fMedium&&(c=$("#board"))&&c.position()&&!$(".list-guide").hasClass("disabled"))return g=
        $(".list"),d=$(".list-link"),f=$(".list-guide"),f.find(".list-guide-wrapper"),d.removeClass("visible first-visible-link last-visible-link"),b=c.position().left,h=c.width()+b,g.each(function(c){
            var f,g,i;
            f=$(this);
            if(WindowSize.fLarge||WindowSize.fExtraLarge)if(i=f.position(),g=i.left,f=i.left+f.width(),g>=b&&f<=h)return $(d[c]).addClass("visible")
                }),$(".list-link.visible").first().addClass("first-visible-link"),$(".list-link.visible").last().addClass("last-visible-link")
        };
        
d.prototype.posListGuide=
function(){
    var c;
    if(!$(".list-guide").hasClass("disabled")||!WindowSize.fLarge&&!WindowSize.fExtraLarge)return $(y).height(),c=$(y).scrollTop(),c=100>c?38:c-30,$(".list-guide").css({
        position:"absolute"
    }).animate({
        top:c
    },150)
    };
    
d.prototype.scroll=function(){
    return ListGuide.posListGuide()
    };
    
return d
}()));
if(C("layout")){
    var R,i=function(d,c){
        return function(){
            return d.apply(c,arguments)
            }
        };
    
R=new (function(){
    function d(){
        this.isEditing=i(this.isEditing,this);
        this.calc_surface=i(this.calc_surface,this);
        this.cancelEdits=i(this.cancelEdits,this);
        this.removeBoardHelpers=i(this.removeBoardHelpers,this);
        this.removeListHelpers=i(this.removeListHelpers,this)
        }
        d.prototype.removeListHelpers=function(){
        $("body").removeClass("layout-horiz-scroll");
        $(".list-area-wrapper").width("");
        return $(".list").width("")
        };
        
    d.prototype.removeBoardHelpers=function(){
        O.calcState="";
        $("#board").height("");
        $(".list-area-wrapper").height("");
        $(".list-area").width("").height("");
        $(".list-cards").css({
            "max-height":""
        });
        return $(".board-actions-list").css({
            "max-height":""
        })
        };
    d.prototype.cancelEdits=function(c){
        $(".edit-controls").remove();
        $(".editing").removeClass("editing");
        $(".new-task").removeClass("focus");
        $("input").not(c||"none").blur();
        $("textarea").not(c||"none").blur();
        c=$(".editable");
        if(0<c.length)return c.each(function(b){
            var c,d,g;
            c=$(".editable")[b];
            g=$(c).find(".edits-warning:first");
            b=$(c).find(".current:first");
            d=$(c).find(".field:first");
            c=d.data("draftKey");
            if(d.val()!==b.text()&&""!==d.val()&&null!=c)return T.set(c,d.val()),g.show()
                })
        };
        
    d.prototype.calc_surface=
    function(){
        var c,b;
        $("#surface").height("");
        c=$(y).height();
        b=$(document).height();
        $(document).width();
        b>c&&(b+=80);
        F.isVisible&&(c=$(".window-wrapper").height()+80,c>b&&(b=c));
        $("#surface").height(b);
        return $("#footer").show()
        };
        
    d.prototype.isEditing=function(){
        return 0<$(".editing").length+$(".new-task.focus").length
        };
        
    return d
    }())
}
C("drag_sort")&&(i=function(d,c){
    return function(){
        return d.apply(c,arguments)
        }
    },y.DragSort=new (function(){
    function d(){
        this.scrollWhileSorting=i(this.scrollWhileSorting,
            this);
        this.scrollListFromUI=i(this.scrollListFromUI,this);
        this.refresh=i(this.refresh,this);
        this.refreshDraggable=i(this.refreshDraggable,this);
        this.refreshCardSortable=i(this.refreshCardSortable,this);
        this.refreshListSortable=i(this.refreshListSortable,this);
        var c=this;
        $(document).mousemove(function(b){
            c.mouseX=b.pageX;
            return c.mouseY=b.pageY
            })
        }
        d.prototype.refreshListSortable=function(){
        if(!Browser.isTouch())return $(".js-list-sortable").sortable({
            containment:"#board",
            handle:".list-header",
            tolerance:"pointer",
            revert:"100",
            placeholder:"list placeholder",
            scroll:!1,
            delay:"75",
            distance:"7",
            start:function(c,b){
                var d,f;
                d=boardView.model.getView(da);
                boardView.cardComposerState.vis&&$(b.helper).hasClass("js-composer")?($(b.placeholder).hide(),$(b.helper).hide(),d.hide()):boardView.cardComposerState.vis&&d.hide();
                O.fMouseSelect=!1;
                DragSort.sorting=!0;
                DragSort.scrollWhileSorting();
                f=$(b.helper).width();
                d=$(b.helper).height();
                return $(b.placeholder).width(f).height(d)
                },
            stop:function(c){
                m.stopPropagation(c);
                return _.defer(function(){
                    return DragSort.sorting=
                    !1
                    })
                }
            })
        };
        
d.prototype.refreshCardSortable=function(){
    if(!Browser.isTouch())return $(".js-sortable").sortable({
        connectWith:".js-sortable",
        revert:"100",
        containment:"#surface",
        placeholder:"list-card placeholder",
        scroll:!1,
        delay:"75",
        distance:"7",
        items:".list-card",
        start:function(c,b){
            var d;
            d=boardView.model.getView(da);
            boardView.cardComposerState.vis&&$(b.helper).hasClass("js-composer")?($(b.placeholder).hide(),$(b.helper).hide(),d.hide()):boardView.cardComposerState.vis&&d.hide();
            d=$(b.helper).height()+
            2;
            $(b.placeholder).height(d);
            DragSort.scrollListFromUI(b);
            O.fMouseSelect=!1;
            DragSort.sorting=!0;
            return DragSort.scrollWhileSorting()
            },
        stop:function(c){
            m.stopPropagation(c);
            setTimeout(function(){
                return DragSort.sorting=!1
                },50);
            return DragSort.scrollList=null
            },
        over:function(c,b){
            return DragSort.scrollListFromUI(b)
            },
        custom:{
            refreshContainers:function(){
                var c,b,d,f,g,h;
                h=[];
                for(b=f=g=this.containers.length-1;0>=g?0>=f:0<=f;b=0>=g?++f:--f)c=this.containers[b].element,d=$(c).closest(".list"),d.length&&
                    (c=d),d=c.offset(),this.containers[b].containerCache.left=d.left,this.containers[b].containerCache.top=d.top,this.containers[b].containerCache.width=c.outerWidth(),h.push(this.containers[b].containerCache.height=c.outerHeight());
                return h
                }
            }
    })
};

d.prototype.refreshDraggable=function(){
    if(!Browser.isTouch())return $(".assignable-members .member").draggable({
        revert:"invalid",
        revertDuration:150,
        zIndex:100,
        helper:"clone",
        delay:"75",
        distance:"7",
        start:function(){
            return n("Board Sidebar","Drag Member")
            },
        stop:function(c){
            return m.stopPropagation(c)
            }
        })
    };
d.prototype.refresh=function(){
    this.refreshListSortable();
    this.refreshCardSortable();
    return this.refreshDraggable()
    };
    
d.prototype.scrollListFromUI=function(c){
    var b;
    return DragSort.scrollList=null!=c?null!=(b=c.placeholder)?b.parents(".list-cards")[0]:void 0:void 0
    };
    
d.prototype.scrollWhileSorting=function(){
    var c,b,d,f,g,h;
    if(this.sorting){
        if(WindowSize.fSmall||WindowSize.fExtraSmall)f=$(y).scrollTop(),b=f+$(y).height()-30,this.mouseY<f?y.scrollBy(0,-15):this.mouseY>b&&y.scrollBy(0,15);
        else if(c=$("#board"),
            d=c.offset(),b=d.left+30,f=d.left+c.width()-30,g=d.top+30,c=d.top+c.height()-30,this.mouseX<b)$(".list-area-wrapper")[0].scrollLeft-=15;
        else if(this.mouseX>f)$(".list-area-wrapper")[0].scrollLeft+=15;
        else if(null!=(null!=(h=this.scrollList)?h.scrollTop:void 0))this.mouseY<g?this.scrollList.scrollTop-=15:this.mouseY>c&&(this.scrollList.scrollTop+=15);
        return setTimeout(this.scrollWhileSorting,20)
        }
    };

return d
}()));
if(C("popover")){
    var v,i=function(d,c){
        return function(){
            return d.apply(c,arguments)
            }
        };
v=new (function(){
    function d(){
        this.init=i(this.init,this)
        }
        var c,b,e,f,g,h;
    b=c=g=e=f=h=null;
    d.prototype.init=function(){
        var b=this;
        this.poViewArray=[];
        this.el_width=1;
        this.el_top=this.el_left="";
        this.view=null;
        h=$(".pop-over");
        f=$(".pop-over .header");
        e=$(".pop-over .content");
        g=h.find(".js-back-view");
        $(g).click(function(){
            return b.popView()
            });
        return $(h).find(".js-close-popover").click(function(c){
            m.stop(c);
            return b.hide()
            })
        };
        
    d.prototype.calcPos=function(b){
        var d,e,f,g,i,m,n;
        f=$(y).width();
        e=$(y).height();
        m=h.width()+16;
        b.elem?(c=b.elem,c.el&&(c=c.el),this.el_width=$(c).outerWidth(),this.el_left=$(c).offset().left,this.el_top=$(c).offset().top+(_.isNumber(b.top)?b.top:28)):b.clientx&&b.clienty&&(this.el_left=b.clientx,this.el_top=b.clienty);
        d=this.el_left+m+16;
        e=WindowSize.fLarge||WindowSize.fExtraLarge?e-30:"";
        b.animate||h.css({
            left:-1E4,
            top:-1E4,
            maxHeight:e
        }).show();
        i=h.height()+16;
        e=this.el_top;
        g=e+i;
        if(WindowSize.fLarge||WindowSize.fExtraLarge)n=$(y).height()+$(y).scrollTop(),g>n&&(e=n-i-8);
        d>
        f?(d=this.el_left-m+this.el_width,0>d&&(d=f-m-5)):d=this.el_left;
        b.animate?h.animate({
            left:d,
            top:e
        },85):h.css({
            left:d,
            top:e
        })
        };
        
    d.prototype.calcTop=function(){
        var b,c,d,e;
        $(y).height();
        $(y).scrollTop();
        c=h.outerHeight();
        d=h.position().top;
        b=d+c;
        if(WindowSize.fLarge||WindowSize.fExtraLarge)e=$(y).height()+$(y).scrollTop(),b>e&&(d=e-c-8);
        return h.css({
            top:d
        })
        };
        
    d.prototype.load=function(b){
        this.view=b;
        this.clearDisplayTypes();
        h.addClass(b.displayType);
        f.find(".header-title").text(b.getViewTitle());
        e.html(b.render().el);
        return b.delegateEvents()
        };
        
    d.prototype.show=function(c){
        R.cancelEdits(c.elActive);
        c.preloaded||(this.hide(),this.load(c.view));
        this.poViewArray.push(c.view);
        this.calcPos(c);
        if(0<h.find(".js-autofocus").length){
            if(Browser.isTouch()&&h.find(".js-autofocus:first").hasClass("js-no-touch-autofocus"))return;
            _.delay(function(){
                return h.find(".js-autofocus:first").focus().select()
                },10)
            }
            "function"===typeof c.shown&&c.shown(h);
        b=c.hidden
        };
        
    d.prototype.pushView=function(b){
        this.load(b.view);
        this.poViewArray.push(b.view);
        g.show();
        if(0<h.find(".js-autofocus").length){
            if(Browser.isTouch()&&h.find(".js-autofocus:first").hasClass("js-no-touch-autofocus"))return;
            _.delay(function(){
                return h.find(".js-autofocus:first").focus().select()
                },10)
            }
            return this.calcTop()
        };
        
    d.prototype.popView=function(){
        var b;
        this.poViewArray.pop();
        if(b=_.last(this.poViewArray)){
            this.load(b);
            1===this.poViewArray.length&&g.hide();
            if(0<h.find(".js-autofocus").length){
                if(Browser.isTouch()&&h.find(".js-autofocus:first").hasClass("js-no-touch-autofocus"))return;
                _.delay(function(){
                    return h.find(".js-autofocus:first").focus().select()
                    },10)
                }
                return this.calcTop()
            }
            v.hide()
        };
        
    d.prototype.toggle=function(b){
        return c===b.elem?this.hide():this.show(b)
        };
        
    d.prototype.hide=function(){
        c=null;
        h.hide();
        h.find(".content").empty();
        g.hide();
        this.poViewArray=[];
        this.clearDisplayTypes();
        this.view=null;
        $(".js-remove-on-po-hide").remove();
        "function"===typeof b&&b(h);
        return b=null
        };
        
    d.prototype.clearDisplayTypes=function(){
        return h.removeClass("miniprofile avdetail")
        };
        
    d.prototype.isVisible=
    function(){
        return h.is(":visible")
        };
        
    return d
    }());
$(v.init)
}
if(C("dialog")){
    var F,i=function(d,c){
        return function(){
            return d.apply(c,arguments)
            }
        };
    
F=new (function(){
    function d(){
        this.init=i(this.init,this)
        }
        var c,b,e,f;
    f=e=b=c=null;
    d.prototype.init=function(){
        c=$(".window");
        b=c.find(".window-wrapper");
        this.scrolltop=0;
        this.isVisible=!1
        };
        
    d.prototype.calcPos=function(){
        var d,e;
        if(!F.isVisible&&(c.css({
            left:-2E4,
            top:-2E4
        }),e=50,WindowSize.fSmall||WindowSize.fExtraSmall||WindowSize.fMedium))e=$(y).scrollTop()+
            8;
        b.width("1");
        WindowSize.fSmall||WindowSize.fExtraSmall?(d=$(document).width(),b.width(d-16)):b.width("");
        d=($(y).width()-c.width())/2;
        F.isVisible?c.css({
            left:d
        }):c.css({
            left:d,
            top:e
        }).show()
        };
        
    d.prototype.getViewName=function(){
        return f
        };
        
    d.prototype.show=function(d){
        var h;
        v.hide();
        this.clear();
        e=d.hide;
        this.scrolltop=$(y).scrollTop();
        $("body").addClass("window-up");
        null!=d.displayType&&c.addClass(d.displayType);
        f=null!=(h=d.view)?h.className:void 0;
        d.view?(this.view=d.view,b.html(this.view.render().el),
            this.view.delegateEvents()):d.html&&(this.view=null,b.html(d.html));
        this.calcPos();
        $(".window-overlay").scrollTop(0);
        this.isVisible=!0;
        R.calc_surface();
        c.find(".js-autofocus:first").focus().select();
        c.find(".js-submit-okay").click(function(){
            var b,e,f,h,i;
            e=c.find("form:first");
            i=e.find(".non-empty");
            for(f=0,h=i.length;f<h;f++)if(b=i[f],/^\s*$/.test($(b).val()))return;F.hide();
            "function"===typeof d.okay&&d.okay({
                form:e
            })
            });
        c.find(".js-submit-cancel").click(function(){
            F.hide();
            "function"===typeof d.cancel&&
            d.cancel()
            });
        c.find("input[type=submit]").click(function(b){
            m.preventDefault(b)
            })
        };
        
    d.prototype.hide=function(b){
        var d=this;
        this.isVisible&&("function"===typeof e&&e(b),this.view=e=null,c.hide(),$("body").removeClass("window-up"),_.defer(function(){
            $(y).scrollTop(d.scrolltop);
            return d.scrolltop=0
            }),this.isVisible=!1,this.removeSpecialClasses(),v.hide())
        };
        
    d.prototype.clear=function(){
        this.removeSpecialClasses();
        b.width("");
        b.empty()
        };
        
    d.prototype.removeSpecialClasses=function(){
        c.removeClass("slim archive")
        };
    return d
    }());
$(F.init)
}
if(C("ref")){
    var ad,i=function(d,c){
        return function(){
            return d.apply(c,arguments)
            }
        },D={}.hasOwnProperty,u=function(d,c){
    function b(){
        this.constructor=d
        }
        for(var e in c)D.call(c,e)&&(d[e]=c[e]);b.prototype=c.prototype;
    d.prototype=new b;
    d.__super__=c.prototype;
    return d
    };
    
ad=function(d){
    function c(){
        this.renderAnnouncement=i(this.renderAnnouncement,this);
        this.render=i(this.render,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.events={
        "click .js-info-menu-about":"clickAbout",
        "click .js-info-menu-help":"clickHelp",
        "click .js-info-menu-guide":"clickGuide",
        "click .js-info-menu-privacy":"clickPrivacy",
        "click .js-info-menu-shortcuts":"clickShortcuts",
        "click .js-info-menu-trello-dev":"clickDev",
        "click .js-info-menu-api":"clickAPI",
        "click .js-info-menu-tos":"clickTOS",
        "click .js-announcements":"openAnnouncements",
        "click .js-info-menu-blog":"clickBlog",
        "click .js-info-menu-twitter":"clickTwitter",
        "click .js-info-menu-facebook":"clickFacebook"
    };
    
    c.prototype.initialize=function(){
        ea.onAddRemove(this.renderAnnouncement);
        return ea.bind("change:unread",this.renderAnnouncement)
        };
        
    c.prototype.getViewTitle=function(){
        return"Information"
        };
        
    c.prototype.render=function(){
        var b;
        b={};
        
        b.showAnnouncements=!_.isEmpty(Ca.models);
        $(this.el).html(t.fill("ref_menu",b));
        this.renderAnnouncement();
        return this
        };
        
    c.prototype.renderAnnouncement=function(){
        var b,c;
        c=ea.top();
        b=$(this.el).find(".js-announce");
        null!=c?(c=c.getView(xe),b.html(c.render().el)):b.empty()
        };
        
    c.prototype.openAnnouncements=function(){
        n("Info","Menu - View All Announcements");
        F.show({
            view:z.me().getView(zc),
            displayType:"slim"
        })
        };
        
    c.prototype.clickAbout=function(){
        return n("Info","Menu - About")
        };
        
    c.prototype.clickHelp=function(){
        return n("Info","Menu - Help")
        };
        
    c.prototype.clickGuide=function(){
        return n("Info","Menu - Guide")
        };
        
    c.prototype.clickPrivacy=function(){
        return n("Info","Menu - Privacy, Security, Data")
        };
        
    c.prototype.clickShortcuts=function(){
        return n("Info","Menu - Shortcuts")
        };
        
    c.prototype.clickDev=function(){
        return n("Info","Menu - Trello Dev Board")
        };
        
    c.prototype.clickAPI=
    function(){
        return n("Info","Menu - API")
        };
        
    c.prototype.clickTOS=function(){
        return n("Info","Menu - Terms of Service")
        };
        
    c.prototype.clickBlog=function(){
        return n("Info","Menu - Trello Blog")
        };
        
    c.prototype.clickTwitter=function(){
        return n("Info","Menu - Twitter Link")
        };
        
    c.prototype.clickFacebook=function(){
        return n("Info","Menu - Facebook Link")
        };
        
    c.prototype.clickFogCreek=function(){
        return n("Info","Menu - Fog Creek Link")
        };
        
    return c
    }(E)
}
if(C("board_layout")){
    var O,i=function(d,c){
        return function(){
            return d.apply(c,
                arguments)
            }
        };
    
O=new (function(){
    function d(){
        this.refreshLayout=i(this.refreshLayout,this);
        this.refreshLayoutImmediately=i(this.refreshLayoutImmediately,this);
        this.calc=i(this.calc,this);
        this.restoreScrolls=i(this.restoreScrolls,this);
        this.saveScrolls=i(this.saveScrolls,this);
        this.getBoard=i(this.getBoard,this);
        this.calc_board=i(this.calc_board,this);
        this.calcLists=i(this.calcLists,this);
        this.selectCard=i(this.selectCard,this);
        this.calcWidgetsHeight=i(this.calcWidgetsHeight,this);
        this.fHorizScroll=
        !1;
        this.fMouseSelect=!0;
        this.newCards=[];
        this.cardToSelect=null;
        this.listScrollLeft=0;
        this.savingScroll=!1
        }
        d.prototype.calcWidgetsHeight=function(){
        var c,b,d;
        if(WindowSize.fLarge||WindowSize.fExtraLarge)return c=$(y).height(),$("#board"),b=$(".board-widget"),d=0,b.each(function(){
            var b;
            if(!$(this).hasClass("board-widget-actions"))return b=$(this).height(),d=d+b+16
                }),c=c-110-d,$(".board-actions-list").css({
            "max-height":c
        })
        };
        
    d.prototype.selectCard=function(c){
        $(".list-card.active-card").removeClass("active-card");
        $(".list.active-list").removeClass("active-list");
        $(c).addClass("active-card");
        return $(c).closest(".list").addClass("active-list")
        };
        
    d.prototype.calcLists=function(){
        var c,b,d,f,g,h,j,i;
        R.removeListHelpers();
        $(".list-area-wrapper").unbind("scroll");
        if(WindowSize.fLarge||WindowSize.fExtraLarge){
            i=$(y).height();
            f=$(".list");
            c=$("#board");
            b=c.width();
            h=f.length;
            g=Math.floor(222*h);
            try{
                this.fHorizScroll&&(j=this.fHorizScroll)
                }catch(o){}
            this.fHorizScroll=g>b;
            !0===j&&!1===this.fHorizScroll&&($(".list-area-wrapper").css({
                overflow:"scroll"
            }),
            $(".list-area-wrapper").scrollLeft(0),$(".list-area-wrapper").css({
                overflow:""
            }));
            b=Math.floor(b/h-12);
            320<b&&(b=320);
            this.fHorizScroll&&(b=210,$("body").addClass("layout-horiz-scroll"));
            $(".list").width(b);
            $(".list-area").width((b+12)*h);
            this.fHorizScroll&&_.defer(function(){
                ListGuide.debounced_calcVisLists();
                return $(".list-area-wrapper").scroll(ListGuide.debounced_calcVisLists())
                });
            c=$(c).hasClass("permission-public");
            d=42;
            O.fHorizScroll&&(d+=23);
            c&&(d-=36);
            f.each(function(b){
                var c,b=$(f[b]);
                c=
                b.find(".list-header").height();
                return b.find(".list-cards").css({
                    "max-height":i-102-c-d
                    })
                })
            }
            ListGuide.build_and_calc()
        };
        
    d.prototype.calc_board=function(){
        var c,b=this;
        R.removeBoardHelpers();
        if(WindowSize.fLarge||WindowSize.fExtraLarge)return c=$(y).height(),$(".list-area-wrapper").height(c-102),_.defer(function(){
            return b.calcWidgetsHeight()
            })
        };
        
    d.prototype.getBoard=function(){
        if(y.boardView&&boardView.model)return boardView.model
            };
            
    d.prototype.saveScrolls=function(){
        var c;
        if(!this.savingScroll&&(this.savingScroll=
            !0,(c=this.getBoard())&&(WindowSize.fLarge||WindowSize.fExtraLarge)))return c.listList.each(function(b){
            return b.getView(ob).saveScroll()
            }),this.listScrollLeft=$(".list-area-wrapper").scrollLeft()
            };
            
    d.prototype.restoreScrolls=function(){
        var c;
        if(c=this.getBoard()){
            if(WindowSize.fLarge||WindowSize.fExtraLarge)c.listList.each(function(b){
                return b.getView(ob).restoreScroll()
                }),$(".list-area-wrapper").scrollLeft(this.listScrollLeft);
            return this.savingScroll=!1
            }
        };
    
d.prototype.calc=function(){
    var c,b,d;
    d=
    $(y).width();
    b=$(y).height();
    c=$("#board").find(".list-area .list").length;
    c=[d,b,c].join();
    return c!==O.calcState?(O.calcState=c,J("layout","calc"),$("body").hasClass("window-up")&&$(".window-wrapper").width("1"),$(document).unbind("scroll"),ListGuide.reset(),O.calc_board(),O.calcLists(),F.isVisible&&F.calcPos(),_.defer(function(){
        ListGuide.calcVisLists();
        return R.calc_surface()
        })):J("layout","calc (ignored)")
    };
    
d.prototype.refreshLayoutImmediately=function(){
    J("render","refreshing layout");
    O.refreshTimeout&&
    (clearTimeout(O.refreshTimeout),O.refreshTimeout=null);
    O.calc();
    return DragSort.refresh()
    };
    
d.prototype.refreshLayout=function(){
    if(!O.refreshTimeout)return BaordLayout.refreshTimeout=setTimeout(O.refreshLayoutImmediately,100)
        };
        
return d
}())
}
if(C("clientVersion")){
    var ye,i=function(d,c){
        return function(){
            return d.apply(c,arguments)
            }
        };
    
ye=function(){
    function d(){
        this.advertiseUpgrade=i(this.advertiseUpgrade,this);
        this.upgradeAvailable=i(this.upgradeAvailable,this);
        this.versionCompatible=i(this.versionCompatible,
            this);
        this.setServerVersion=i(this.setServerVersion,this);
        this.lessThanClient=i(this.lessThanClient,this);
        this.greaterThanClient=i(this.greaterThanClient,this);
        this.compareWithClient=i(this.compareWithClient,this);
        var c,b,d,f;
        this.version="undefined"!==typeof TrelloVersion&&null!==TrelloVersion?TrelloVersion:"vDev";
        this.server={};
        
        f=["version","versionMin","versionMax","versionAdvertiseMin","versionAdvertiseMax"];
        for(b=0,d=f.length;b<d;b++)c=f[b],this.server[c]=null;
        this.server.version=this.version
        }
    d.prototype.compareWithClient=function(c){
        return Aa.compareStringVersions(c,this.version)
        };
        
    d.prototype.greaterThanClient=function(c){
        return 0<this.compareWithClient(c)
        };
        
    d.prototype.lessThanClient=function(c){
        return 0>this.compareWithClient(c)
        };
        
    d.prototype.setServerVersion=function(c){
        var b,d;
        c.trellisVersion&&(c.version=c.trellisVersion);
        b=!1;
        for(d in this.server)this.server[d]!==c[d]&&(b=!0,this.server[d]=c[d]);return b
        };
        
    d.prototype.versionCompatible=function(){
        var c,b,d;
        if(this.version===this.server.version)return!0;
        d=Aa.differInMostMinorOnly(this.compareWithClient(this.server.version));
        c=!this.server.versionMin||!this.greaterThanClient(this.server.versionMin);
        b=!this.server.versionMax||!this.lessThanClient(this.server.versionMax);
        return d&&c&&b
        };
        
    d.prototype.upgradeAvailable=function(){
        return this.version!==this.server.version
        };
        
    d.prototype.advertiseUpgrade=function(){
        var c,b;
        if(this.version===this.server.version)return!1;
        c=!this.server.versionAdvertiseMin||!this.greaterThanClient(this.server.versionAdvertiseMin);
        b=!this.server.versionAdvertiseMax||!this.lessThanClient(this.server.versionAdvertiseMax);
        return this.versionCompatible()&&!(c&&b)
        };
        
    return d
    }()
}
if(C("controller")){
    var ze,i=function(d,c){
        return function(){
            return d.apply(c,arguments)
            }
        },D={}.hasOwnProperty,u=function(d,c){
    function b(){
        this.constructor=d
        }
        for(var e in c)D.call(c,e)&&(d[e]=c[e]);b.prototype=c.prototype;
    d.prototype=new b;
    d.__super__=c.prototype;
    return d
    };
    
ze=function(d){
    function c(){
        this.syncError=i(this.syncError,this);
        this.stopUpgrade=
        i(this.stopUpgrade,this);
        this.upgradeNow=i(this.upgradeNow,this);
        this.upgradeClient=i(this.upgradeClient,this);
        this.advertiseUpgrade=i(this.advertiseUpgrade,this);
        this.upgradeAvailable=i(this.upgradeAvailable,this);
        this.setServerVersion=i(this.setServerVersion,this);
        this.defaultView=i(this.defaultView,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.initialize=function(){
        var b=this;
        return $(rpc).bind("reconnect",function(){
            return b.refreshSubscribedModels()
            })
        };
        
    c.prototype.routes=

    {
        "":"defaultView",
        landing:"landingView",
        search:"searchView",
        "api/generateToken":"generateTokenView",
        "board/*path":"boardView",
        help:"manualView",
        about:"manualView",
        guide:"manualView",
        shortcuts:"manualView",
        questions:"manualView",
        privacy:"manualView",
        data:"manualView",
        yourdata:"manualView",
        security:"manualView",
        blank:"blankView",
        "org/create":"organizationCreateView",
        "org/:id":"organizationById",
        "card/board/:idBoard/:idCard":"cardBoardContextView",
        "card/board/:slug/:idBoard/:idCard":"cardSlugBoardContextView",
        "card/:idBoard/:idCard":"cardBoardContextView",
        "card/:slug/:idBoard/:idCard":"cardSlugBoardContextView",
        "card/:username/:idBoard/:idCard":"cardMemberContextView",
        "card/:username/:slug/:idBoard/:idCard":"cardSlugMemberContextView",
        ":username/boards":"memberBoardsView",
        ":username/notifications":"memberNotificationsView",
        ":name/account":"userOrOrgAccountView",
        ":name/closed":"organizationClosedBoardsView",
        ":name/?":"userOrOrgProfileView",
        "*splat":"displayErrorPage"
    };
    
    c.prototype.viewType="none";
    c.prototype.idBoardCurrent=
    null;
    c.prototype.setLocation=function(b){
        var c,d;
        d=b.title;
        c=b.location;
        b=b.unreadCount;
        d&&(this.title=d);
        null!=b&&(this.unreadCount=b);
        this.title&&(d=this.unreadCount?"("+this.unreadCount+") ":"",document.title=""+d+this.title+" | Trello");
        c&&(/^#/.test(c)&&(c=c.substr(1)),this.saveLocation(c),this.location=c)
        };
        
    c.prototype.load=function(b){
        return this.setLocation({
            location:b
        })
        };
        
    c.prototype.getPermanentOrganizationUrl=function(b){
        return"/org/"+b
        };
        
    c.prototype.getOrganizationUrl=function(b){
        return"/"+
        b
        };
        
    c.prototype.getOrganizationAccountUrl=function(b){
        return"/"+b+"/account"
        };
        
    c.prototype.getOrganizationClosedBoardUrl=function(b){
        return"/"+b+"/closed"
        };
        
    c.prototype.getOrganizationMembersUrl=function(b){
        return"/"+b+"/members"
        };
        
    c.prototype.getBoardUrl=function(b,c){
        var d,g;
        if(null!=(null!=b?b.id:void 0))b=b.id;
        d=(d=null!=(g=Models.Board.get(b))?g.get("name"):void 0)?"/board/"+m.makeSlug(d)+"/"+b:"/board/"+b;
        c&&(d+="/"+c);
        return d
        };
        
    c.prototype.getMemberBoardProfileUrl=function(b,c){
        return""+this.getBoardUrl(c)+
        "/member/"+b
        };
        
    c.prototype.saveBoardLocation=function(b,c){
        this.setLocation({
            title:Models.Board.get(b).get("name"),
            location:this.getBoardUrl(b,c)
            })
        };
        
    c.prototype.getMemberProfileUrl=function(b){
        null==b&&(b=z.myUsername());
        return"/"+b
        };
        
    c.prototype.getMemberNotificationsUrl=function(b){
        null==b&&(b=z.myUsername());
        return"/"+b+"/notifications"
        };
        
    c.prototype.getMemberBoardsUrl=function(b){
        null==b&&(b=z.myUsername());
        return b===z.myUsername()?"/":"/"+b+"/boards"
        };
        
    c.prototype.getMemberAccountUrl=function(b){
        null==
        b&&(b=z.myUsername());
        return"/"+b+"/account"
        };
        
    c.prototype.getMemberProfileCardUrl=function(b,c,d){
        return"card/board/"+c+"/"+d
        };
        
    c.prototype.getPermanentCardUrl=function(b,c,d){
        return d?"/card/"+d.get("username")+"/"+b+"/"+c:"/card/board/"+b+"/"+c
        };
        
    c.prototype.getCardUrl=function(b,c){
        var d,g;
        d=b.get("name");
        return this.getCardUrlWithoutModels(b.get("idBoard"),null!=(g=b.get("idShort"))?g:b.id,d,c)
        };
        
    c.prototype.getCardUrlWithoutModels=function(b,c,d,g){
        return g?"/card/"+g.get("username")+"/"+m.makeSlug(d)+
        "/"+b+"/"+c:m.isShortId(c)?"/card/"+m.makeSlug(d)+"/"+b+"/"+c:"/card/board/"+m.makeSlug(d)+"/"+b+"/"+c
        };
        
    c.prototype.saveCardLocation=function(b,c){
        var d;
        b.getBoard();
        d=b.getBoard().get("name");
        return this.setLocation({
            title:""+b.get("name")+" on "+d,
            location:this.getCardUrl(b,c)
            })
        };
        
    c.prototype.saveMemberBoardProfileLocation=function(b,c){
        return this.setLocation({
            title:""+b.get("fullName"),
            location:this.getMemberBoardProfileUrl(b.get("username"),c)
            })
        };
        
    c.prototype.saveBrowseLocation=function(){
        this.setLocation({
            title:"Public Boards",
            location:"browse"
        })
        };
        
    c.prototype.saveSearchLocation=function(){
        this.setLocation({
            title:"Search",
            location:"search"
        })
        };
        
    c.prototype.saveOrganizationCreateLocation=function(){
        this.setLocation({
            title:"Create Organization",
            location:"org/create"
        })
        };
        
    c.prototype.onMemberView=function(){
        return"member"===this.viewType
        };
        
    c.prototype.onAnyOrganizationView=function(){
        return"organization"===this.viewType
        };
        
    c.prototype.onOrganizationView=function(b){
        return this.onAnyOrganizationView()&&this.idOrganizationCurrent===
        b
        };
        
    c.prototype.onAnyBoardView=function(){
        return"board"===this.viewType
        };
        
    c.prototype.onBoardView=function(b){
        return this.onAnyBoardView()&&this.idBoardCurrent===b
        };
        
    c.prototype.onBrowseView=function(){
        return"browse"===this.viewType
        };
        
    c.prototype.onErrorView=function(){
        return"error"===this.viewType
        };
        
    c.prototype.defaultView=function(){
        return z.isLoggedIn()?this.memberBoardsView():this.landingView()
        };
        
    c.prototype.startNewView=function(b,c){
        this.viewType=b;
        this.onAnyBoardView()?this.onBoardView(c)||(rpc.subscribeTo("Board",
            c),this.idBoardCurrent=c):(rpc.subscribeTo("Board",null),this.idBoardCurrent=null);
        this.onAnyOrganizationView()?this.onOrganizationView(c)||(rpc.subscribeTo("Organization",c),this.idOrganizationCurrent=c):(rpc.subscribeTo("Organization",null),this.idOrganizationCurrent=null);
        R.calcState="";
        this.showSpinner()
        };
        
    c.prototype.refreshSubscribedModels=function(){
        rpc.resync(this.idBoardCurrent,this.idOrganizationCurrent,z.myId());
        rpc.invoke("subscribeToBoard",[this.idBoardCurrent]);
        return rpc.invoke("subscribeToOrganization",
            [this.idOrganizationCurrent])
        };
        
    c.prototype.clearPreviousView=function(){
        v.hide();
        S.clearAllCardFilters();
        F.isVisible&&F.hide();
        $("#content").html("");
        $("#surface").height("");
        $("body").scrollTop("0").removeClass("fixed-content").removeClass("adaptive-content").removeClass("full-content")
        };
        
    c.prototype.boardView=function(b,c){
        var d,g;
        g={};
        
        d=b.split("/");
        g.idBoard=1===d.length?d[0]:d[1];
        3===d.length?g.section=d[2]:4===d.length&&(g.usernameBoardProfile=d[3]);
        this.displayBoard(g,c)
        };
        
    c.prototype.displayBoard=
    function(b,c){
        var d,g,h,j,i,o,m,n=this;
        J("controller",["boardView",b.idBoard]);
        i=function(){
            return n.displayErrorPage({
                errorType:"boardNotFound"
            })
            };
            
        if((j=b.idBoard||(null!=(g=b.board)?g.id:void 0))&&!b.board)g=Models.Board.get(j),null!=g&&g.isPartiallyLoaded()||(b.board=g);
        if(!j)return i();
        d=b.board&&this.onBoardView(j);
        h=this.attachSpinnerCallback(c);
        this.startNewView("board",j);
        o=function(c){
            var e,g,j,i;
            y.boardView=e=c.getView(Cd);
            d||(n.clearPreviousView(),n.showHeader(),$("body").addClass("full-content"),
                $("#content").html(e.render().el));
            b.idCard?(j=function(b){
                return b?(b.getView(pb).showDetail(function(b){
                    b||n.saveBoardLocation(c.id)
                    }),n.saveCardLocation(b)):n.saveBoardLocation(c.id)
                },(g=c.getCard(b.idCard))?j(g):Models.loadCardData(b.idBoard,b.idCard,function(d){
                if(null!=d)n.saveBoardLocation(c.id);else return g=c.getCard(b.idCard),g.get("idBoard")===c.id?j(g):y.navigate(Controller.getCardUrl(g))
                    })):b.usernameBoardProfile?null!=(i=Models.Member.find("username",b.usernameBoardProfile)[0])&&i.viewBoardProfile(c.id):
            (F.isVisible&&F.hide(),c.onId(function(){
                n.saveBoardLocation(c.id)
                }));
            "function"===typeof h&&h(y.boardView)
            };
            
        b.board&&!b.forceReload?(null!=(m=z.me())&&m.clearCache(),o(b.board)):null!=j?Models.loadCurrentBoardData(j,function(b){
            if(null!=b)return i();
            n.clearPreviousView();
            b=Models.Board.get(j);
            if(!b)return i();
            o(b)
            }):i()
        };
        
    c.prototype.landingView=function(){
        return this.staticView({
            title:"Organize anything, together.",
            location:z.isLoggedIn()?"/landing":"/",
            template:"landing",
            bodyClass:"adaptive-content",
            data:{
                typekit:!0
                }
            })
    };
    
c.prototype.searchView=function(b){
    var c,d;
    J("controller",["searchView"]);
    d=this;
    c=this.attachSpinnerCallback(b);
    d.startNewView("search");
    Models.loadHeaderData(function(){
        var b,h;
        d.clearPreviousView();
        b=m.getQueryParameter("q","");
        Bb.query=b;
        h=new Ac;
        h.update(b,{
            partial:!0,
            cards_limit:12
        });
        d.showHeader();
        $("body").addClass("fixed-content");
        $("#content").html(h.render().el);
        "function"===typeof c&&c(h);
        return R.calc_surface()
        })
    };
    
c.prototype.organizationById=function(b,c){
    var d=
    this;
    Models.loadOrgNameById(b,function(g){
        return d.organizationProfileView(g,b,c)
        },function(){
        return d.displayErrorPage()
        })
    };
    
c.prototype.organizationCreateView=function(b){
    var c;
    J("controller",["organizationCreateView"]);
    c=this;
    b=this.attachSpinnerCallback(b);
    c.startNewView("createOrganization");
    Models.loadMemberBoardsData("me",function(){
        var d;
        c.clearPreviousView();
        $("body").addClass("fixed-content");
        d=Models.Organization.all();
        d=new re({
            model:{
                organizationList:new OrganizationList(d)
                }
            });
    $("#content").html(d.render().el);
        c.showHeader();
        c.saveOrganizationCreateLocation();
        "function"===typeof b&&b(d)
        },function(){
        c.displayErrorPage()
        });
R.calc_surface()
};

c.prototype.organizationProfileView=function(b,c,d){
    this.displayOrganizationPage({
        orgname:b,
        loadFn:"loadOrganizationData",
        viewClass:ue,
        getLocation:this.getOrganizationUrl,
        idOrganization:c,
        callback:d
    })
    };
    
c.prototype.organizationAccountView=function(b,c,d){
    this.displayOrganizationPage({
        orgname:b,
        loadFn:"loadOrganizationData",
        viewClass:pe,
        getLocation:this.getOrganizationAccountUrl,
        idOrganization:c,
        callback:d,
        adminOnly:!0
        })
    };
    
c.prototype.organizationClosedBoardsView=function(b,c,d){
    this.displayOrganizationPage({
        orgname:b,
        loadFn:"loadOrganizationData",
        viewClass:qe,
        getLocation:this.getOrganizationClosedBoardUrl,
        idOrganization:c,
        callback:d
    })
    };
    
c.prototype.userOrOrgProfileView=function(b,c){
    null==b&&(b="me");
    this.userOrOrgView(b,this.memberProfileView,this.organizationProfileView,c)
    };
    
c.prototype.userOrOrgAccountView=function(b,c){
    null==b&&(b="me");
    this.userOrOrgView(b,this.memberAccountView,
        this.organizationAccountView,c)
    };
    
c.prototype.userOrOrgView=function(b,c,d,g){
    var h,j,i=this;
    j=y.sessionStorage;
    h="userOrOrg_"+b;
    return async.waterfall([function(b){
        var c,d,e;
        c=null!=j?j.getItem(h):void 0;
        return null!=c?(e=c.split("|"),d=e[0],c=e[1],b(null,{
            type:d,
            id:c
        })):b(null,{})
        },function(c,d){
        return null==(null!=c?c.type:void 0)?$.get("/1/types/"+b).done(function(b){
            return d(null,b)
            }).fail(function(){
            return d("notFound")
            }):d(null,c)
        }],function(m,q){
        null!=(null!=q?q.type:void 0)&&null!=(null!=
            q?q.id:void 0)&&null!=j&&j.setItem(h,""+q.type+"|"+q.id);
        switch(null!=q?q.type:void 0){
            case "member":
                return c.call(i,b,g);
            case "organization":
                return d.call(i,b,q.id,g);
            default:
                return i.displayErrorPage({
                callback:g
            })
            }
            })
};

c.prototype.displayOrganizationPage=function(b){
    var c,d,g;
    g=b.orgname;
    J("controller",["organization"]);
    d=this;
    c=this.attachSpinnerCallback(b.callback);
    d.startNewView("organization",b.idOrganization);
    Models[b.loadFn](g,function(h){
        var j;
        d.clearPreviousView();
        h=Models.Organization.get(null!=
            (j=h.id)?j:h.idOrganization);
        !h.owned()&&b.adminOnly?d.organizationProfileView(g,b.idOrganization):(j=h.getView(b.viewClass),d.showHeader(),$("body").addClass("fixed-content"),$("#content").html(j.render().el),j=""+h.get("displayName")+" ("+h.get("name")+")",d.setLocation({
            title:j,
            location:b.getLocation(h.get("name"))
            }),"function"===typeof c&&c(h))
        },function(){
        d.displayErrorPage()
        });
    R.calc_surface()
    };
    
c.prototype.memberProfileView=function(b,c){
    var d=this;
    null==b&&(b="me");
    this.displayMemberPage({
        username:b,
        loadFn:"loadMemberProfileData",
        viewClass:fc,
        getLocation:function(b){
            return d.getMemberProfileUrl(b)
            },
        callback:c
    })
    };
    
c.prototype.memberNotificationsView=function(b,c){
    var d=this;
    null==b&&(b="me");
    this.displayMemberPage({
        username:b,
        loadFn:"loadNotificationData",
        viewClass:pd,
        getLocation:function(b){
            return d.getMemberNotificationsUrl(b)
            },
        callback:c
    })
    };
    
c.prototype.memberBoardsView=function(b,c,d){
    var g=this;
    null==b&&(b="me");
    this.displayMemberPage(_.extend({
        username:b,
        loadFn:"loadMemberBoardsData",
        viewClass:nd,
        getLocation:function(b){
            return g.getMemberBoardsUrl(b)
            },
        callback:d
    },c))
    };
    
c.prototype.memberAccountView=function(b,c){
    var d=this;
    this.displayMemberPage({
        username:"me",
        loadFn:"loadMemberAccountData",
        viewClass:jd,
        getLocation:function(b){
            return d.getMemberAccountUrl(b)
            },
        callback:c
    })
    };
    
c.prototype.displayMemberPage=function(b){
    var c,d,g,h,j,i,m=this;
    j=b.username;
    g=b.loadFn;
    i=b.viewClass;
    d=b.getLocation;
    c=b.callback;
    h=b.message;
    null==j&&(j=z.myUsername());
    J("controller",["memberBoardsView"]);
    c=this.attachSpinnerCallback(c);
    this.startNewView("memberBoardsView");
    Models[g](j,function(g,j){
        var n,s,t;
        m.clearPreviousView();
        s=!g&&null!=j?Models.Member.get(null!=(n=j.id)?n:j.idMember):null;
        g||!s?m.displayErrorPage():(n=s.getView(i,void 0,{
            isMore:j.isMore,
            data:j
        }),m.showHeader(),$("body").addClass("fixed-content"),$("#content").html(n.render().el),t=""+s.get("fullName")+" ("+s.get("username")+")",b.idCard&&b.idBoard?(n=Models.Board.get(b.idBoard),n=n.getCard(b.idCard),n.getView(pb).showDetail(function(){
            this.setLocation({
                title:t,
                location:d(s.get("username"))
                })
            }),m.saveCardLocation(n,s)):m.setLocation({
            title:t,
            location:d(s.get("username"))
            }),"function"===typeof c&&c(s),null!=h&&Z.flash(h.text,"confirm","member"))
        });
    R.calc_surface()
    };
    
c.prototype.cardSlugBoardContextView=function(b,c,d,g){
    this.cardBoardContextView(c,d,g)
    };
    
c.prototype.cardBoardContextView=function(b,c,d){
    this.displayBoard({
        idBoard:b,
        idCard:c
    },d)
    };
    
c.prototype.cardSlugMemberContextView=function(b,c,d,g,h){
    this.cardMemberContextView(b,d,g,h)
    };
    
c.prototype.cardMemberContextView=
function(b,c,d,g){
    var h=this;
    this.displayMemberPage({
        idBoard:c,
        idCard:d,
        loadFn:"loadMemberData",
        username:b,
        viewClass:fc,
        getLocation:function(b){
            return h.getMemberProfileCardUrl(b,c,d)
            }
        },g)
};

c.prototype.blankView=function(b){
    var c,d;
    d=this;
    c=this.attachSpinnerCallback(b);
    d.startNewView("blank");
    return Models.loadHeaderData(function(){
        d.clearPreviousView();
        d.showHeader();
        "function"===typeof c&&c();
        return R.calc_surface()
        })
    };
    
c.prototype.manualView=function(b){
    var c,d,g,h,j=this;
    g=document.location.hash?
    document.location.hash.substr(1):document.location.pathname.substr(1);
    h=m.capitalize(g);
    if("data"===g||"yourdata"===g||"security"===g)g="privacy";
    c=function(b,c){
        var d;
        d={
            is_static:"static"===b,
            is_board:"board"===b,
            manual_content:t["manual_"+g]
            };
            
        d[g]=!0;
        d.title=h;
        d=t.fill("manual_base",d);
        return c(d)
        };
        
    d=g;
    this.onAnyBoardView()?(c("board",function(b){
        return F.show({
            html:b,
            hide:function(){
                return Controller.saveBoardLocation(j.idBoardCurrent)
                }
            })
    }),this.setLocation({
        title:h,
        location:d
    })):this.staticView({
    title:h,
    location:d,
    template:function(b){
        return c("static",b)
        },
    bodyClass:"fixed-content"
},b)
};

c.prototype.staticView=function(b,c){
    var d,g,h,j,i,m,q,n;
    q=b.title;
    j=b.location;
    i=b.template;
    m=b.templateData;
    d=b.bodyClass;
    n=b.viewType;
    if(_.isFunction(m)||!m)c=m,m={};
        
    J("controller",[j+"View"]);
    h=this;
    g=this.attachSpinnerCallback(c);
    h.startNewView(null!=n?n:j);
    Models.loadHeaderData(function(){
        var b;
        h.clearPreviousView();
        h.showHeader();
        b=function(b){
            $("body").addClass(d);
            $("#content").html(b);
            h.setLocation(q,{
                location:j
            });
            "function"===typeof g&&g();
            return R.calc_surface()
            };
            
        _.isFunction(i)?i(b):b(t.fill(i,m))
        })
    };
    
c.prototype.showHeader=function(){
    var b;
    $("#header .header-user").remove();
    $("#header .header-about").remove();
    b=z.me();
    $("#header").append(b.getView(Xc).render().el);
    $("#header").append(b.getView(Vc).render().el);
    b.checkColorBlindMode()
    };
    
c.prototype.displayErrorPage=function(b){
    var c;
    c=b=_.extend({
        errorType:"notFound"
    },b);
    null!=b&&b.errorType&&(c[b.errorType]=!0,c.url=location.pathname);
    this.staticView({
        title:"Error",
        template:"error",
        templateData:b,
        viewType:"error"
    },b.callback)
    };
    
c.prototype.showSpinner=function(){
    return Z.showHtml("<div class='spinner right'></div>","","loading")
    };
    
c.prototype.hideSpinner=function(){
    return Z.hide("loading")
    };
    
c.prototype.attachSpinnerCallback=function(b){
    var c;
    c=this;
    return function(d){
        c.hideSpinner();
        return"function"===typeof b?b(d):void 0
        }
    };

c.prototype.goBack=function(){
    Backbone.history.ignoreNext();
    y.history.back()
    };
    
c.prototype.clientVersion=new ye;
c.prototype.setServerVersion=
function(b){
    this.clientVersion.setServerVersion(b)&&$(this).triggerHandler("change:serverVersion");
    if(!this.clientVersion.versionCompatible())return this.upgradeClient()
        };
        
c.prototype.upgradeAvailable=function(){
    return this.clientVersion.upgradeAvailable()
    };
    
c.prototype.advertiseUpgrade=function(){
    return this.clientVersion.advertiseUpgrade()
    };
    
c.prototype.upgradeClient=function(){
    var b,c=this;
    if(!this.upgrading)return this.upgrading=!0,b=m.randomWait(360,1800),"active"===Monitor.getStatus()&&(b=m.randomWait(60,
        300)),Z.showHtml((new xc).render({
        timeInSeconds:b
    }),"confirm","upgrade"),setTimeout(function(){
        if(c.upgrading)return c.upgradeNow()
            },1E3*b)
    };
    
c.prototype.upgradeNow=function(){
    Z.hideAll();
    return y.location.reload()
    };
    
c.prototype.stopUpgrade=function(){
    this.upgrading=!1;
    return Z.showHtml((new xc).render({
        stopped:!0
        }),"confirm","upgrade")
    };
    
c.prototype.syncError=function(){
    return Z.showHtml(t.fill("sync_error"),"error","modelSync")
    };
    
return c
}(Backbone.Controller);
(function(){
    var d,c,b,e;
    c=y.location;
    d=
    /^#*/;
    e=/^\/*/;
    b=/\?.*$/;
    _.extend(Backbone.History.prototype,{
        loadUrl:_.wrap(Backbone.History.prototype.loadUrl,function(b){
            if(this.shouldIgnoreNext)this.shouldIgnoreNext=!1,this.fragment=this.getFragment();else return b.apply(this)
                }),
        ignoreNext:function(){
            return this.shouldIgnoreNext=!0
            },
        getFragment:function(c){
            c=c||y.location;
            return m.pushSupport()?c.pathname.replace(e,""):c.hash.replace(d,"").replace(b,"")
            },
        start:function(){
            var b,d,e=this;
            if(m.pushSupport())$(y).bind("popstate",function(){
                F.hide(!0);
                return e.checkUrl()
                });
            else if("onhashchange"in y)if("/"===c.pathname)$(y).bind("hashchange",this.checkUrl);
                else{
                d="/#"+c.pathname;
                c.replace(d);
                return
            }
            b=this;
            $(function(){
                $("body").delegate('a[href^="/"]',"click",function(c){
                    var d;
                    !c.ctrlKey&&!c.metaKey&&!c.shiftKey&&(d=$(this).attr("href"),v.hide(),/\/(about|guide|shortcuts|help|privacy|questions)/.test(d)||F.hide(!0),!$(this).hasClass("js-real-link")&&!/\/(logout|login|signup|forgot)/i.test(d)&&(m.preventDefault(c),b.saveLocation(d,!0),b.checkUrl()))
                    })
                });
            y.navigate=function(c,d){
                var e;
                null==d&&(d={});
                e=c||location.pathname;
                c||(z.check(),z.isLoggedIn()&&/^\/landing$/.test(e)&&(e="/"));
                b.saveLocation(e,!0);
                return d.forceReload?location.reload():b.loadUrl()
                };
                
            $(y).bind("navigate",function(b,c,d){
                y.navigate(c,d)
                });
            this.loadUrl()
            },
        saveLocation:function(b,g){
            b=(b||"").replace(d,"").replace(e,"");
            this.fragment!==b&&(g||(this.fragment=b),m.pushSupport()?history.pushState({
                ts:new Date
                },document.title,""+c.protocol+"//"+c.host+"/"+b):y.location.hash=b,this.trackPageview(b))
            },
        trackPageview:function(b){
            ""===b&&(b=z.isLoggedIn()?"boards":"landing");
            "undefined"!==typeof _gaq&&null!==_gaq&&(_gaq.push(["_setAccount","UA-225715-29"]),_gaq.push(["_trackPageview","/"+b]))
            }
        })
})()
}
if(C("alert")){
    var Z,i=function(d,c){
        return function(){
            return d.apply(c,arguments)
            }
        };
    
Z=new (function(){
    function d(){
        this.hideAll=i(this.hideAll,this);
        this.hide=i(this.hide,this);
        this.showHtml=i(this.showHtml,this);
        this.show=i(this.show,this);
        this._showHideContainer=i(this._showHideContainer,this);
        this._show=
        i(this._show,this);
        this._hide=i(this._hide,this);
        var c,b,d,f=this;
        d=null;
        c=function(){
            clearTimeout(d);
            f.hide("connection");
            return f.showHtml(t.fill("connect_failed",{
                msg:"Could not connect to Trello."
            }),"error","connectionDead")
            };
            
        $(rpc).bind("connect_failed",c);
        $(rpc).bind("reconnect_failed",c);
        b=function(){
            clearTimeout(d);
            return f.hide("connection")
            };
            
        c=function(){
            clearTimeout(d);
            return d=setTimeout(function(){
                d=null;
                return f.show("Attempting to restore connection.  Changes made now may not be saved.",
                    "error","connection")
                },500)
            };
            
        $(y.Api).bind("reconnect",b);
        $(y.Api).bind("connecting",c);
        $(rpc).bind("reconnect",b);
        $(rpc).bind("connecting",c)
        }
        d.prototype._alerts={};
    
    d.prototype._hide=function(c){
        var b;
        b=this._alerts[c];
        null!=b&&b.timeout&&clearTimeout(b.timeout);
        delete this._alerts[c];
        $("#notification_"+c).remove();
        return this._showHideContainer()
        };
        
    d.prototype._show=function(c,b,d,f,g){
        var h,j=this;
        J("alerts","show",c,b,d,f,g);
        this._hide(f);
        g&&(h=setTimeout(function(){
            return j.hide(f)
            },g));
        this._alerts[f]=

        {
            timeout:h
        };
        
        d=$("<div>").attr("id","notification_"+f).addClass(d).appendTo("#notification");
        b?d.html(c):d.text(c);
        return this._showHideContainer()
        };
        
    d.prototype._showHideContainer=function(){
        return $("#notification").toggle(!_.isEmpty(this._alerts))
        };
        
    d.prototype.show=function(c,b,d,f){
        return this._show(c,!1,b,d,f)
        };
        
    d.prototype.showHtml=function(c,b,d,f){
        return this._show(c,!0,b,d,f)
        };
        
    d.prototype.flash=function(c,b,d){
        return this._show(c,!1,b,d,2E3)
        };
        
    d.prototype.hide=function(c){
        J("alerts","hide",c);
        return this._hide(c)
        };
        
    d.prototype.hideAll=function(){
        var c,b;
        b=[];
        for(c in this._alerts)b.push(this.hide(c));return b
        };
        
    return d
    }())
}
C("desktop_notification")&&(y.DesktopNotifications=function(){
    var d,c;
    d=y.webkitNotifications;
    return c={
        exists:function(){
            return null!=d
            },
        permission:function(){
            return c.exists()?d.checkPermission():2
            },
        enabled:function(){
            return 0===c.permission()
            },
        denied:function(){
            return 2===c.permission()
            },
        notEnabled:function(){
            return 1===c.permission()
            },
        requestPermission:function(b){
            if(c.notEnabled())return d.requestPermission(b)
                },
        notify:function(b,e){
            var f,g;
            null==e&&(e=b,b=null);
            f=e.html;
            c.enabled()&&f&&(g=null!=b?b:Math.floor(1E5*Math.random()),null==T.get("notification_lock_"+g)&&(T.set("notification_lock_"+g,"locked"),null==T.get("notification_"+g)&&(T.set("notification_"+g,f),f=d.createHTMLNotification("/notify.html#"+g),f.onclose=function(){
                var b;
                b=T.get("notification_response_"+g);
                T.unset("notification_response_"+g);
                "function"===typeof e.close&&e.close(b)
                },f.onclick=function(){
                y.focus();
                this.cancel();
                "function"===typeof e.click&&
                e.click(this)
                },f.show(),f=_.once(function(){
                return T.unset("notification_lock_"+g)
                }),_.delay(f,5E3),$(y).bind("unload",f))))
            }
        }
}());
C("keyboard")&&$(function(){
    var d,c,b,e,f,g,h;
    d=null;
    g="";
    h=function(){
        d=null;
        return g=""
        };
        
    c=function(b,c){
        g=b;
        return d=c
        };
        
    $(document).mousemove(function(){
        if(!v.isVisible()&&!DragSort.sorting)return O.fMouseSelect=!0
            });
    f=function(b){
        var c,e;
        return F.isVisible&&"Card"!==(null!=(c=F.view)?null!=(e=c.model)?e.typeName:void 0:void 0)||Browser.isTouch()||v.isVisible()&&!d||
        m.jqGetActiveElement().is("input:visible,textarea:visible")||b.ctrlKey||b.altKey||b.metaKey
        };
        
    $(document).keydown(function(c){
        var d,g;
        return f(c)||c.shiftKey&&!((d=c.which)===Tb||d===Vb||d===Ea)?void 0:(g=c.keyCode)===Y||g===ja||g===X||g===ia||g===Ea||g===Rb||g===ba?b(c):e(c)
        });
    $(document).keypress(function(c){
        if(0===c.keyCode&&c.charCode===Wb&&c.shiftKey&&!f(c))return b(c)
            });
    b=_.throttle(function(b){
        var c,e,f,g,h,i,t,u,y,C,D,E;
        switch(b.which){
            case Rb:
                if(F.isVisible||v.isVisible()||R.isEditing())break;
                n("Keyboard Shortcuts","Header Boards Menu");
                m.stop(b);
                return $(".js-open-header-boards-menu").click();
            case Ea:case Wb:
                return n("Keyboard Shortcuts","Shortcuts page"),Controller.saveLocation("shortcuts"),Controller.manualView();
            case ba:
                b=$(".list-card.active-card").first();
                if(!b)break;
                b=F.isVisible?null!=(E=F.view)?E.model:void 0:d||b.data("card");
                if(!b)break;
                if(F.isVisible){
                if(0<$(F.view.el).find(".card-detail-title").length&&!v.isVisible()&&!R.isEditing()&&b.getBoard().editableByMember(z.me()))return n("Keyboard Shortcuts",
                    "Enter - Open Card"),_.delay(function(){
                    return $(F.view.el).find(".window-title-text.current").click()
                    },30)
                }else return n("Keyboard Shortcuts","Enter - Edit Card Title"),$(b.view.el).click();
                break;
            case Y:case ja:case X:case ia:
                if(F.isVisible||v.isVisible()||R.isEditing()||"undefined"!==typeof boardView&&null!==boardView&&boardView.cardComposerState.vis)break;
                O.fMouseSelect=!1;
                O.cardToSelect=null;
                D=$(".list-card.active-card").first();
                E=$(".list.active-list").first();
                g=[];
                $(".list").each(function(b){
                b=
                $(".list")[b];
                if(0<$(b).find(".list-card:visible").length)return g.push(b)
                    });
            f=g.length;
            i=y="";
            $(g).each(function(b){
                if($(g[b]).hasClass("active-list"))return i=g[b+1],y=g[b-1]
                    });
            e=$(".list").index(g[0]);
                f=$(".list").index(g[f-1]);
                e*=179;
                f*=179;
                t=0;
                i&&(t=$(".list").index(i),t*=179);
                C=0;
                y&&(C=$(".list").index(y),C*=179);
                h=u="";
                c=$(".list-card:visible");
                c.each(function(b){
                var d,e;
                d=c[b];
                e=b-1;
                b+=1;
                if($(d).hasClass("active-card"))return h=c[b],u=c[e]
                    });
            $(".list-card.active-card").removeClass("active-card");
                $(".list.active-list").removeClass("active-list");
                b.which===Y?(n("Keyboard Shortcuts","Keyboard Nav","Up"),0===D.length?$(g).last().find(".list-card:visible:last").addClass("active-card"):($(u).addClass("active-card"),b=$(D).height()+6,$(E).find(".list-cards").animate({
                    scrollTop:"-="+b
                    },75))):b.which===ja?(n("Keyboard Shortcuts","Keyboard Nav","Right"),0===D.length?($(g).first().find(".list-card:visible:first").addClass("active-card"),$(g).first().find(".list-cards").animate({
                    scrollTop:0
                },75),$(".list-area-wrapper").animate({
                    scrollLeft:e
                },
                75)):($(i).find(".list-cards").animate({
                    scrollTop:0
                },75),$(i).find(".list-card:visible:first").addClass("active-card"),$(".list-area-wrapper").animate({
                    scrollLeft:t
                },75))):b.which===X?(n("Keyboard Shortcuts","Keyboard Nav","Down"),0===D.length?$(g).first().find(".list-card:visible:first").addClass("active-card"):($(h).addClass("active-card"),b=$(D).height()+6,$(E).find(".list-cards").animate({
                    scrollTop:"+="+b
                    },75))):b.which===ia&&(n("Keyboard Shortcuts","Keyboard Nav","Left"),0===D.length?($(g).last().find(".list-card:visible:first").addClass("active-card"),
                    $(g).last().find(".list-cards").animate({
                        scrollTop:0
                    },75),$(".list-area-wrapper").animate({
                        scrollLeft:f
                    },75)):($(y).find(".list-cards").animate({
                    scrollTop:0
                },75),$(y).find(".list-card:visible:first").addClass("active-card"),$(".list-area-wrapper").animate({
                    scrollLeft:C
                },75)));
                return $(".list-card.active-card").first().closest(".list").addClass("active-list")
                }
            },25);
return e=_.throttle(function(b){
    var e,f,i,t,u;
    if(!F.isVisible&&!v.isVisible()&&!R.isEditing()&&(WindowSize.fLarge||WindowSize.fExtraLarge))switch(b.which){
        case Qc:
            n("Keyboard Shortcuts",
            "Q - My cards");
        z.me()&&z.isLoggedIn()&&($("#board"),S.fQActive?(S.clearAllCardFilters(),S.fQActive=!1):(S.filterMyCards(),S.fQActive=!0));
            break;
        case Nc:
            n("Keyboard Shortcuts","F - Search and Filter Cards");
            m.stop(b);
            $(".js-filter-cards").click();
            return;
        case Uc:
            n("Keyboard Shortcuts","X - Clear All Filters");
            S.clearAllCardFilters();
            break;
        case oa:
            boardView.escCancel=!0,e=$(".ui-sortable").find(".ui-sortable-helper").parent(".ui-sortable"),u=e.sortable("option","revert"),e.sortable("option","revert",
            !1).sortable("cancel").sortable("option","revert",u)
            }
            if(u=$(".list-card.active-card").first())if(e=F.isVisible?null!=(i=F.view)?i.model:void 0:d||u.data("card"))if(i=!e.getBoard().editableByMember(z.me()),m.stop(b),d){
        if(!i){
            if("labels"===g)switch(b.which){
                case fb:case Mb:case Nb:case Ob:case Pb:case Qb:
                    i=b.which-fb,i<e.labels.length&&e.toggleLabel(e.labels[i])
                    }
                    v.hide();
            g=d=null
            }
        }else{
        if(!i)switch(b.which){
            case Mc:case Kc:
                n("Keyboard Shortcuts","C / Delete - Archive Card");
                i=$(e.view.el).next(".list-card:visible");
                $(e.view.el).remove();
                O.selectCard(i);
                O.cardToSelect=i;
                e.close();
                break;
            case Vb:
                n("Keyboard Shortcuts","> - Move to Next List");
                e.moveToNextList();
                break;
            case Tb:
                n("Keyboard Shortcuts","< - Move to Previous List");
                e.moveToPrevList();
                break;
            case Sc:
                n("Keyboard Shortcuts","Space - Toggle Assigning Self");
                e.toggleMember(z.myId());
                break;
            case ha:
                F.isVisible?v.isVisible()?v.hide():(n("Keyboard Shortcuts","A - Assign Members","Card Detail"),c("members",e),$(F.view.el).find(".js-change-card-members").click()):
                (n("Keyboard Shortcuts","A - Assign Members","Board View"),c("members",e),O.fMouseSelect=!1,v.toggle({
                    elem:u.find(".js-card-menu")[0],
                    pointer:"right",
                    location:"center",
                    view:e.getView(Eb,"keyboard",{
                        hideOnEnter:!0
                        }),
                    shown:function(b){
                        return b.find(".filter-members").select().focus()
                        }
                    }));
            break;
        case Pc:
            if(F.isVisible)return;
            n("Keyboard Shortcuts","N - Insert Card");
            n("Card Composer","Open","Via 'n' Keyboard Shortcut");
            f=$(".list-card.active-card");
            i=$(".list.active-list").first();
            t=i.find(".list-card");
            u=$(".list");
            f=_.indexOf(t,f[0])+1;
            i=_.indexOf(u,i[0]);
            i=boardView.model.listList.filter(function(b){
                return!b.get("closed")
                })[i].id;
            boardView.cardComposerState.pos.idList=i;
            boardView.cardComposerState.pos.cardPos=f;
            boardView.model.getView(da).updatePositionOnBoard();
            break;
        case Rc:
            e.get("subscribed")?(n("Keyboard Shortcuts","S - Subscribe","Subscribe"),e.subscribe(!1)):(n("Keyboard Shortcuts","S - Subscribe","Unsubscribe"),e.subscribe(!0));
            return;
            case Oc:
            F.isVisible?(n("Keyboard Shortcuts","L - Edit Labels",
            "On Card Detail"),v.isVisible()?v.hide():(c("labels",e),$(F.view.el).find(".js-edit-labels").click())):(n("Keyboard Shortcuts","L - Edit Labels","On Board View"),c("labels",e),O.fMouseSelect=!1,v.toggle({
            elem:$(u).find(".js-card-menu"),
            view:e.getView(Db,"keyboard",{
                showShortcuts:!0,
                hideOnSelect:!0
                }),
            pointer:"right",
            location:"center",
            hidden:h
        }));
        break;
        case Lc:
            F.isVisible?v.isVisible()?v.hide():(n("Keyboard Shortcuts","D - Due Dates","On Card Detail"),$(F.view.el).find(".js-add-due-date").is(":visible")?
            (c("date",e),$(F.view.el).find(".js-add-due-date").click()):$(F.view.el).find(".js-change-due-date").is(":visible")&&(c("date",e),$(F.view.el).find(".js-change-due-date").click())):(n("Keyboard Shortcuts","D - Due Dates","On Board View"),c("date",e),O.fMouseSelect=!1,v.toggle({
            elem:$(u).find(".js-card-menu"),
            view:e.getView($a,"keyboard"),
            pointer:"right",
            location:"center",
            hidden:h
        }));
        break;
        case fb:case Mb:case Nb:case Ob:case Pb:case Qb:
            n("Keyboard Shortcuts","1-6 - Toggle Specific Label");
            i=b.which-
            fb;
            i<e.labels.length&&e.toggleLabel(e.labels[i]);
            break;
        default:
            J("keyboard",b.which)
            }
            switch(b.which){
        case Tc:
            n("Keyboard Shortcuts","V - Vote"),e.toggleVote()
            }
        }
},250)
});
if(C("trellis-client")){
    if(y.unsupported)return;
    $(function(){
        y.Controller=new ze;
        Backbone.history.start()
        });
    (function(){
        var d;
        d=z.updateToken();
        return setInterval(function(){
            var c;
            c=z.updateToken();
            c!==d&&y.location.reload();
            return d=c
            },3E3)
        })()
    }
    C("doc_init")&&($(document).ready(function(){
    var d;
    Browser.init();
    WindowSize.calc();
    d=
    _.debounce(function(){
        WindowSize.calc();
        O.saveScrolls();
        O.calc();
        return O.restoreScrolls()
        },300);
    $(y).resize(d);
    y.orientationchange=F.calcPos;
    "placeholder"in document.createElement("input")||$('input[placeholder]:not(".js-no-ie-placeholder"), textarea[placeholder]:not(".js-no-ie-placeholder")').live({
        focus:function(){
            var c;
            c=$(this);
            if(c.hasClass("placeholder"))return c.removeClass("placeholder").val("")
                },
        blur:function(){
            var c;
            c=$(this);
            if(""===c.val().trim())return c.addClass("placeholder").val(c.attr("placeholder"))
                }
            });
$(".header-signup").live("click",function(){
    return n("Header","Sign Up")
    });
$(".js-show-search").click(function(){
    return $(this).closest("#header").toggleClass("show-search")
    });
$(".header-logo").live("click",function(){
    return n("Header","Logo","Home")
    });
$(".js-info-about").live("click",function(){
    return n("Info","Page - About")
    });
$(".js-info-help").live("click",function(){
    return n("Info","Page - Help")
    });
$(".js-info-guide").live("click",function(){
    return n("Info","Page - Guide")
    });
$(".js-info-privacy").live("click",
    function(){
        return n("Info","Page - Privacy, Security, Data")
        });
$(".js-info-shortcuts").live("click",function(){
    return n("Info","Page - Shortcuts")
    });
$(".js-info-trello-dev").live("click",function(){
    return n("Info","Page - Trello Dev Board")
    });
$(".js-info-api").live("click",function(){
    return n("Info","Page - API")
    });
$(".js-info-tos").live("click",function(){
    return n("Info","Page - Terms of Service")
    });
$(".js-info-blog").live("click",function(){
    return n("Info","Page - Trello Blog")
    });
$(".js-info-twitter").live("click",
    function(){
        return n("Info","Page - Twitter Link")
        });
$(".js-info-facebook").live("click",function(){
    return n("Info","Page - Facebook Link")
    });
$(".js-info-fogcreek").live("click",function(){
    return n("Info","Page - Fog Creek Link")
    });
$(".window-overlay").click(function(c){
    if(!($(c.target).is("a[href^='/']")||0<$(c.target).closest(".window-wrapper").length)){
        m.stopPropagation(c);
        if(R.isEditing())return R.cancelEdits();
        if($(".new-comment").hasClass("focus"))$(".new-comment").removeClass("focus");else return v.isVisible()?
            v.hide():F.hide()
            }
        });
$(".window-wrapper").click(function(c){
    if(!$(c.target).is("a[href^='/']")&&!($(c.target).closest("a").hasClass("js-real-link")||0<c.button))$(c.target).is("a")&&"#"!==$(c.target).attr("href")?m.stopPropagation(c):$(c.target).is("a")&&$(c.target).hasClass("js-close-window")?(m.stop(c),F.hide()):$(".new-comment").hasClass("focus")?$(".new-comment").removeClass("focus"):$(c.target).is("input")?m.stopPropagation(c):(v.isVisible()&&v.hide(),R.cancelEdits(),m.stop(c))
        });
$("#surface").click(function(c){
    if($(c.target).is("input")||
        $(c.target).is("textarea"))m.stopPropagation(c);
    else if($(".new-comment").hasClass("focus"))$(".new-comment").removeClass("focus");
    else{
        if(v.isVisible())return v.hide();
        if(R.isEditing())return R.cancelEdits();
        if("undefined"!==typeof boardView&&null!==boardView&&boardView.cardComposerState.vis&&0<!$(c.target).closest(".card-composer").length)return"undefined"!==typeof boardView&&null!==boardView?boardView.model.getView(da).hide():void 0
            }
        });
$("a[href=#]").live("click",function(c){
    return m.preventDefault(c)
    });
return $(document).keyup(function(c){
    if(c.keyCode===oa){
        if(R.isEditing())return R.cancelEdits();
        if(v.isVisible())return v.popView();
        if("undefined"!==typeof boardView&&null!==boardView&&boardView.cardComposerState.vis)return"undefined"!==typeof boardView&&null!==boardView?boardView.model.getView(da).hide():void 0;
        F.hide();
        $("input").blur();
        return $("textarea").blur()
        }
    })
}),$.fn.fixPlaceholder=function(){
    if("placeholder"in document.createElement("input"))return this;
    this.filter('input[placeholder]:not(".js-no-ie-placeholder"), textarea[placeholder]:not(".js-no-ie-placeholder")').each(function(){
        var d;
        d=$(this);
        return d.addClass("placeholder").val(d.attr("placeholder"))
        });
    return this
    });
if(C("time")){
    var Ta;
    Ta=new (function(){
        function d(){}
        d.prototype.delta=T.get("serverTimeDelta");
        d.prototype.updateServerTime=function(c){
            this.delta=new Date(c)-new Date;
            T.set("serverTimeDelta",this.delta);
            return J("time","delta",this.delta)
            };
            
        d.prototype.serverToClient=function(c){
            return new Date(new Date(c)-this.delta)
            };
            
        return d
        }())
    }
    if(C("dates")){
    var U;
    y.Dates=U=new (function(){
        function d(){}
        var c,b;
        b="";
        c=function(){
            var c,
            d,g;
            c=U.parse($(this).attr("dt"));
            c=Ta.serverToClient(c);
            g=Math.abs((b-c.getTime())/1E3);
            d=c>b;
            $(this).text(function(){
                var b,i;
                if(10>g)return d?"now":"just now";
                if(120>g)return d?"in a minute":"a minute ago";
                i=Math.floor(g/60);
                if(60>i)return d?"in "+i+" minutes":""+i+" minutes ago";
                if(120>i)return d?"in an hour":"an hour ago";
                b=Math.floor(i/60);
                i=" at "+c.toString("h:mmtt").toLowerCase();
                if(24>b)return d?"in "+b+" hours":""+b+" hours ago";
                if(48>b)return(d?"tomorrow":"yesterday")+i;
                b=Math.floor(b/
                    24);
                return 3>b?(d?"in "+b+" days":""+b+" days ago")+i:90>b?c.toString("MMM d")+i:c.toString("MMM d, yyyy")+i
                });
            $(this).is("[title]")||$(this).attr("title",""+c.toLocaleDateString()+" "+c.toLocaleTimeString())
            };
            
        d.prototype.isUS=/en-us/i.test(navigator.language||navigator.browserLanguage);
        d.prototype.update=function(d){
            b=(new Date).getTime();
            $(d).find(".date[dt]").each(c)
            };
            
        d.prototype.convertDateFormat=function(b){
            null==b&&(b="");
            return this.isUS?b:b.replace(/(?:^|\s)(\d{1,2})[\/-](\d{1,2})(?:[\/-](\d\d{2,4}))?(?:$|\s)/g,
                function(b,c,d,e){
                    return 12>=d?e?""+d+"/"+c+"/"+e+" ":""+d+"/"+c+" ":b
                    })
            };
            
        d.prototype.parse=function(b){
            var c;
            null==b&&(b="");
            b=this.convertDateFormat(b);
            c=new Date(b);
            return isNaN(c)?new Date(b.replace(/-/g,"/").replace(/T|Z|\.\d+/g," ")+" GMT"):c
            };
            
        d.prototype.toShortString=function(b){
            return this.isUS?b.toString("MM/dd/yyyy"):b.toString("dd/MM/yyyy")
            };
            
        d.prototype.toLongString=function(b){
            var c;
            c=Date.today();
            return c.getYear()===b.getYear()?c.getMonth()===b.getMonth()&&c.getDate()===b.getDate()?
            "Today at "+b.toString("h:mm tt"):""+b.toString("MMM d")+" at "+b.toString("h:mm tt"):""+b.toString("MMM d, yyyy")+" at "+b.toString("h:mm tt")
            };
            
        return d
        }());
    $(function(){
        return setInterval(function(){
            U.update("body")
            },1E4)
        })
    }
    if(C("adminAlert")){
    var Ae;
    Ae=new (function(){
        function d(){}
        d.prototype.show=function(c){
            var b,d,f,g;
            b=c.alertType;
            d=c.data;
            f=c.date;
            c=c.dateExpires;
            U.parse(f);
            c=U.parse(c);
            switch(b){
                case "text":
                    return 0<(null!=d?null!=(g=d.text)?g.length:void 0:void 0)?(b=Ta.serverToClient(c)-
                    new Date,Z.show(d.text,"info","admin",b)):Z.hide("admin")
                    }
                };
        
    d.prototype.process=function(c){
        if(c.length)return this.show(c[0])
            };
            
    return d
    }());
$(rpc).bind("adminAlert",function(d,c){
    return Ae.show(c.deltas.msg)
    })
}
if(C("search")){
    var Be,Ac,Ce,Bb,De,i=function(d,c){
        return function(){
            return d.apply(c,arguments)
            }
        },D={}.hasOwnProperty,u=function(d,c){
    function b(){
        this.constructor=d
        }
        for(var e in c)D.call(c,e)&&(d[e]=c[e]);b.prototype=c.prototype;
    d.prototype=new b;
    d.__super__=c.prototype;
    return d
    };
    
Bb=new (function(){
    function d(){}
    d.prototype.getResults=function(c,b,d){
        var f;
        f=b.limit;
        b=b.partial;
        null==f&&(f=5);
        null==b&&(b=!0);
        c={
            query:c,
            limit:f,
            partial:b
        };
        
        Controller.onAnyBoardView()&&(c.idBoard=Controller.idBoardCurrent);
        return $.post("/api/app/search",{
            token:z.myToken(),
            data:c
        },d)
        };
        
    d.prototype.navigateToSearch=function(c){
        return $(y).triggerHandler("navigate","/search?q="+encodeURIComponent(c))
        };
        
    d.prototype.init=function(){
        var c;
        c=new De;
        return $("#header-search").html(c.render().el)
        };
        
    return d
    }());
De=function(d){
    function c(){
        this.doSearch=
        i(this.doSearch,this);
        this.updateSearch=i(this.updateSearch,this);
        this.submitSearch=i(this.submitSearch,this);
        this.doSearchDebounced=_.debounce(this.doSearch,150);
        this.submitted=!1;
        this.resultsView=new Ac;
        c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.tagName="form";
    c.prototype.events={
        "input #search-text":"updateSearch",
        "keydown #search-text":"updateSearch",
        "click #search-submit":"submitSearch",
        "click .js-search-submit":"submitSearch"
    };
    
    c.prototype.render=function(){
        $(this.el).html(t.fill("search_input",
            Bb));
        return this
        };
        
    c.prototype.submitSearch=function(b){
        var c;
        c=$("#search-text").val();
        m.stop(b);
        this.submitted=!0;
        v.hide();
        return Controller.onAnyBoardView&&m.isShortId(c)?(b=Models.Card.find("idShort",parseInt(c,10))[0],c=null!=b?Controller.getCardUrl(b):Controller.getCardUrlWithoutModels(Controller.idBoardCurrent,c,""),y.navigate(c)):Bb.navigateToSearch(c)
        };
        
    c.prototype.updateSearch=function(b){
        var c;
        if(m.isSubmitKey(b.keyCode))return"search"===Controller.viewType?(m.stop(b),this.submitted=!1,this.doSearchDebounced()):
            this.submitSearch(b);
        if(!((c=b.keyCode)===pa||c===ka||c===na||c===ia||c===ja||c===Y||c===X||c===oa))return this.submitted=!1,this.doSearchDebounced()
            };
            
    c.prototype.doSearch=function(){
        var b,c,d;
        if(!this.submitted)if(b=$(this.el).find("#search-text"),d=b.val(),m.isValidSearch(d)){
            if(c="search"===Controller.viewType,this.resultsView.update(d,{
                partial:!0,
                cards_limit:c?12:5,
                isOnSearchPage:c
            }),!c)return v.load(this.resultsView),v.show({
                elem:b,
                top:b.outerHeight()+8,
                view:this.resultsView,
                elActive:b,
                preloaded:!0
                })
            }else v.hide()
            };
    return c
    }(E);
Ac=function(d){
    function c(){
        this.render=i(this.render,this);
        this.update=i(this.update,this);
        this.results={};
        
        c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.getViewTitle=function(){
        return"Search Results"
        };
        
    c.prototype.update=function(b,c){
        var d,g,h,i=this;
        h=c.partial;
        d=c.cards_limit;
        g=c.isOnSearchPage;
        null==h&&(h=!1);
        return Models.loadSearchData({
            query:b,
            partial:h,
            board_fields:"name,url,prefs",
            cards_limit:null!=d?d:5,
            card_members:!0,
            card_board:!0,
            card_list:!0,
            boards_limit:5,
            members_limit:5,
            organizations_limit:5
        },function(b,c){
            i.results=c;
            b||i.render();
            if(g)return $("#content").html(i.el)
                })
        };
        
    c.prototype.render=function(){
        var b,c,d,g,h,i,l,m,n,u,v;
        $(this.el).html(t.fill("search_instant_results",this.results));
        i=_.pluck(null!=(d=this.results.cards)?d:[],"id");
        l=_.pluck(null!=(n=this.results.boards)?n:[],"id");
        n=_.pluck(null!=(u=this.results.members)?u:[],"id");
        u=_.pluck(null!=(h=this.results.organizations)?h:[],"id");
        c=$(this.el).find(".js-card-results");
        b=$(this.el).find(".js-board-results");
        d=$(this.el).find(".js-member-results");
        h=$(this.el).find(".js-org-results");
        g=$(this.el).find(".js-no-results");
        if(0<i.length||0<l.length||0<n.length||0<u.length){
            g.hide();
            if(0<i.length){
                i=_.pluck(null!=(v=this.results.cards)?v:[],"id");
                for(v=0,g=i.length;v<g;v++)m=i[v],(m=Models.Card.get(m))&&c.find(".js-list").append(m.getView(Be).render().el);
                c.show()
                }else c.hide();
            if(0<l.length){
                for(c=0,v=l.length;c<v;c++)if(i=l[c],i=Models.Board.get(i))i=i.getView(nb).render().el,b.find(".js-list").append(i),
                    "search"!==Controller.viewType&&$(i).find(".js-boards-list-menu").remove();b.show()
                }else b.hide();
            if(0<n.length){
                for(l=0,b=n.length;l<b;l++)c=n[l],(c=Models.Member.get(c))&&d.find(".js-list").append(c.getView(Ce).render().el);
                d.show()
                }else d.hide();
            if(0<u.length){
                for(n=0,d=u.length;n<d;n++)if(l=u[n],b=Models.Organization.get(l))l=_.escape(b.get("name")),b=_.escape(b.get("displayName")),h.find(".js-list").append("<li><a class='link-item' href='/"+l+"'><span class='item-name'>"+b+"</span></a></li>");
                h.show()
                }else h.hide()
                }else g.show();
        return this
        };
        
    return c
    }(E);
Be=function(d){
    function c(){
        this.openCard=i(this.openCard,this);
        this.render=i(this.render,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.tagName="div";
    c.prototype.className="search-result-card";
    c.prototype.events={
        "click .list-card":"openCard"
    };
    
    c.prototype.render=function(){
        var b,c,d,g,h,i;
        d=this.model.toJSON();
        d.labels=this.model.getLabels();
        d.url="function"===typeof(b=this.model).getUrl?b.getUrl():void 0;
        b=this.model.getBoard();
        c=this.model.getList();
        h=_.escape(c.get("name"));
        c=_.escape(b.get("name"));
        b=null!=(i=b.get("prefs"))?i.permissionLevel:void 0;
        "org"===b&&(b="org-private");
        $(this.el).html("<div class='list-card clearfix'>\n  "+t.fill("card_in_list",d)+"\n</div>\n<p class='quiet list-card-position'>in <strong>"+h+"</strong> on <strong>"+c+'</strong><span class="app-icon small-icon '+b+'-icon"></span></p>');
        b=this.model.memberList.models;
        d=$(this.el).find(".list-card-members");
        for(c=0,h=b.length;c<
            h;c++)i=b[c],d.append("<div class='member'>          "+t.fill("member",i.toJSON())+"        </div>");
        g=$(this.el).find(".badges");
        this.model.badgeList.forEach(function(b){
            b=b.getView(Qa,"cardsearch");
            g.append(b.render().el)
            });
        return this
        };
        
    c.prototype.openCard=function(b){
        m.stop(b);
        y.navigate(Controller.getCardUrl(this.model))
        };
        
    return c
    }(E);
Ce=function(d){
    function c(){
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.tagName="li";
    c.prototype.className="search-result-member";
    c.prototype.events=

    {
        "hover .js-select-member":"hoverMember"
    };
    
    c.prototype.render=function(){
        var b;
        b=this.model.toJSON();
        b.url="/"+this.model.get("username");
        $(this.el).html(t.fill("select_member",b,{},{
            member:t.member
            }));
        return this
        };
        
    c.prototype.hoverMember=function(b){
        var c;
        c=$(b.target).closest(".item");
        m.selectMenuItem($(b.target).closest(".js-list"),".item",c)
        };
        
    return c
    }(E);
$(function(){
    return Bb.init()
    })
}
if(C("track")){
    var n;
    n=function(d,c,b,e){
        var f;
        return null!=(f=y._gaq)?f.push(["_trackEvent",d,c,b,e]):void 0
        }
    }
if(C("autocomplete")){
    var vc,
    i=function(d,c){
        return function(){
            return d.apply(c,arguments)
            }
        },D={}.hasOwnProperty,u=function(d,c){
    function b(){
        this.constructor=d
        }
        for(var e in c)D.call(c,e)&&(d[e]=c[e]);b.prototype=c.prototype;
    d.prototype=new b;
    d.__super__=c.prototype;
    return d
    };
    
vc=function(d){
    function c(){
        this.selectAllCommenters=i(this.selectAllCommenters,this);
        this.selectAllBoardMembers=i(this.selectAllBoardMembers,this);
        this.selectAllCardMembers=i(this.selectAllCardMembers,this);
        this.insertMember=i(this.insertMember,this);
        this.fillMembers=
        i(this.fillMembers,this);
        this.deselectMember=i(this.deselectMember,this);
        this.hoverItem=i(this.hoverItem,this);
        this.filterMentionables=i(this.filterMentionables,this);
        this.keyupEvent=i(this.keyupEvent,this);
        this.getMembers=i(this.getMembers,this);
        this.render=i(this.render,this);
        return c.__super__.constructor.apply(this,arguments)
        }
        u(c,d);
    c.prototype.getViewTitle=function(){
        return"Mention..."
        };
        
    c.prototype.events={
        "hover .js-select-member":"hoverItem",
        "click .js-select-member":"insertMember",
        "click .js-select-all-card-members":"selectAllCardMembers",
        "hover .js-select-all-card-members":"deselectMember",
        "click .js-select-all-board-members":"selectAllBoardMembers",
        "hover .js-select-all-board-members":"deselectMember",
        "click .js-select-all-commenters":"selectAllCommenters",
        "hover .js-select-all-commenters":"deselectMember",
        keydown:"keydownEvent"
    };
    
    c.prototype.render=function(){
        var b,c=this;
        b={};
        
        this.options.input&&(b.input=!0);
        this.options.button&&(b.button=!0);
        $(this.el).html(t.fill("popover_auto_mentioner",b));
        this.memsEl=$(this.el).find(".js-available-members");
        this.getMembers();
        0<this.idCardMems.length&&($(this.el).find(".js-select-all-card-members").css({
            display:"block"
        }),$(this.el).find(".js-select-all-card-members .mem-count").html("("+this.idCardMems.length+")"));
        0<this.idBoardMems.length&&($(this.el).find(".js-select-all-board-members").css({
            display:"block"
        }),$(this.el).find(".js-select-all-board-members .mem-count").html("("+this.idBoardMems.length+")"));
        0<this.idCommenters.length&&($(this.el).find(".js-select-all-commenters").css({
            display:"block"
        }),
        $(this.el).find(".js-select-all-commenters .mem-count").html("("+this.idCommenters.length+")"));
        (0<this.idBoardMems.length||0<this.idCardMems.length||0<this.idCommenters.length)&&$(this.el).find(".js-select-multiple-options").css({
            display:"block"
        });
        this.options.button?this.fillMembers(this.idAllMembers):this.options.input&&this.filterMentionables();
        _.delay(function(){
            return $(c.el).find(".js-filter-mentionables").keyup(c.keyupEvent)
            },20);
        return this
        };
        
    c.prototype.getMembers=function(){
        var b,c,d;
        d=
        z.myId();
        c=this.model;
        b=c.board;
        this.idCardMems=_.without(c.getIdCardMems(),d);
        this.idBoardMems=_.without(b.getIdBoardMems(),d);
        this.idCommenters=_.without(c.getIdCommenters(),d);
        return this.idAllMembers=_.uniq(this.idCardMems.concat(this.idBoardMems).concat(this.idCommenters))
        };
        
    c.prototype.clearMemberList=function(){
        return this.memsEl.empty()
        };
        
    c.prototype.keydownEvent=function(b){
        var c;
        if((c=b.keyCode)===va||c===ba)m.stop(b),this.memsEl.find(".item.selected:first .js-select-member").click()
            };
            
    c.prototype.keyupEvent=
    function(b){
        var c,d;
        if(!((c=b.keyCode)===va||c===ba))if((d=b.keyCode)===Y||d===ja||d===X||d===ia)m.navMenuList(this.memsEl,".item",b.keyCode);else return this.filterMentionables()
            };
            
    c.prototype.filterMentionables=function(){
        var b,c,d,g,h,i,l;
        this.clearMemberList();
        this.options.button?g=$(".js-filter-mentionables").val().trim().toLowerCase():this.options.input&&(b=$(".new-comment-input")[0],b=m.getWordFromCaret(b),g=b.str.substring(1).toLowerCase());
        h=RegExp("^"+g);
        b=this.idAllMembers;
        this.idMatchMems=
        [];
        for(i=0,l=b.length;i<l;i++)c=b[i],d=m.getMemNameArray(c),_.detect(d,function(b){
            return h.test(b)
            })&&this.idMatchMems.push(c);
        if(this.options.input&&(1===this.idMatchMems.length&&g===Models.Member.get(this.idMatchMems[0]).get("username")||0===this.idMatchMems.length))_.delay(function(){
            return v.hide()
            },5);else return this.fillMembers(this.idMatchMems),m.selectMenuItem(this.memsEl,".item",this.memsEl.find(".item").first())
            };
            
    c.prototype.hoverItem=function(b){
        b=$(b.target).closest(".item");
        return m.selectMenuItem(this.memsEl,
            ".item",b)
        };
        
    c.prototype.deselectMember=function(){
        return this.memsEl.find(".item").removeClass("selected")
        };
        
    c.prototype._membersFromIds=function(b){
        return _.compact(_.map(b,function(b){
            return Models.Member.get(b)
            }))
        };
        
    c.prototype.fillMembers=function(b){
        var c,d,g;
        c=this._membersFromIds(b).slice(0,5);
        for(d=0,g=c.length;d<g;d++)b=c[d],this.memsEl.append(t.fill("select_member",b.toJSON(),{},{
            member:t.member
            }));
        0===c.length&&this.memsEl.html("<p class='quiet' style='padding: 8px 8px 4px;'>No matching members</p>")
        };
    c.prototype.insertMember=function(b){
        var c,d;
        m.stop(b);
        n("Card Detail","Mention Member Autocomplete","Insert");
        c=$(b.target).closest(".js-select-member").find(".username").text();
        b=$(".new-comment-input")[0];
        this.options.button?m.insertSelection(b,"@"+c+" "):this.options.input&&(d=m.getWordFromCaret(b),m.insertSelection(b,"@"+c+" ",d.start,d.end));
        v.hide()
        };
        
    c.prototype.selectAllCardMembers=function(b){
        var c,d,g,h,i;
        m.stop(b);
        n("Card Detail","Mention Member Autocomplete","Insert - All Card Members");
        b=$(".new-comment-input").focus();
        c="";
        i=this.idCardMems;
        for(g=0,h=i.length;g<h;g++)d=i[g],d=Models.Member.get(d).get("username"),c+="@"+d+" ";
        m.insertSelection(b,c);
        v.hide()
        };
        
    c.prototype.selectAllBoardMembers=function(b){
        var c,d,g,h,i;
        m.stop(b);
        n("Card Detail","Mention Member Autocomplete","Insert - All Board Members");
        b=$(".new-comment-input").focus();
        c="";
        i=this.idBoardMems;
        for(g=0,h=i.length;g<h;g++)d=i[g],d=Models.Member.get(d).get("username"),c+="@"+d+" ";
        m.insertSelection(b,c);
        v.hide()
        };
        
    c.prototype.selectAllCommenters=
    function(b){
        var c,d,g,h,i;
        m.stop(b);
        n("Card Detail","Mention Member Autocomplete","Insert - All Commenters");
        b=$(".new-comment-input").focus();
        c="";
        i=this._membersFromIds(this.idCommenters);
        for(g=0,h=i.length;g<h;g++)d=i[g],d=d.get("username"),c+="@"+d+" ";
        m.insertSelection(b,c);
        v.hide()
        };
        
    return c
    }(E)
}
C("desktopNotification",!0)&&$(function(){
    var d;
    if(T.enabled()&&(setTimeout(function(){
        return y.close()
        },1E4),d=location.hash.substr(1),/^[a-f0-9]+$/.test(d)))return d="notification_"+d,$("#desktop-notification>div").html(T.get(d)),
        T.unset(d)
        })
}
})(window);
